Fix font erroring char. Add accel lockout for autostart.
Helps for the following issues: #51 #38
This commit is contained in:
@@ -18,6 +18,10 @@ int main(void) {
|
||||
operatingMode = SOLDERING;
|
||||
else if (systemSettings.autoStart == 2)
|
||||
operatingMode = SLEEP;
|
||||
if (systemSettings.autoStart) {
|
||||
InterruptMask = 1; //set the mask
|
||||
lastMovement = 0;
|
||||
}
|
||||
while (1) {
|
||||
Clear_Watchdog(); //reset the Watch dog timer
|
||||
ProcessUI();
|
||||
@@ -36,12 +40,17 @@ int main(void) {
|
||||
//^ This is a workaround for the IRQ being set off before we have the handler setup and enabled.
|
||||
}
|
||||
}
|
||||
if (GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET) {
|
||||
if ((GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET)&&!InterruptMask) {
|
||||
lastMovement = millis();
|
||||
//This is a workaround for the line staying low as the user is still moving. (ie sensitivity is too high for their amount of movement)
|
||||
}
|
||||
delayMs(15); //Slow the system down waiting for the iron.
|
||||
if (systemSettings.autoStart && (millis() > 10000) && InterruptMask) {
|
||||
//If the user has setup the device to auto enter a startup mode, we normally have the interrupts on motion masked for the inital 10 seconds to prevent waking up during initalization
|
||||
//This allows us to re-enable these interrupts.
|
||||
InterruptMask = 0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
void setup() {
|
||||
|
||||
Reference in New Issue
Block a user