Skip to content

Commit

Permalink
Reset shutdown timer forwards on shutdown timeout
Browse files Browse the repository at this point in the history
Default shutdown mode off
  • Loading branch information
Ralim committed Jul 28, 2023
1 parent 2d3d357 commit 6188190
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/Core/BSP/MHP30/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
* How many seconds/minutes we wait until going to sleep/shutdown.
* Values -> SLEEP_TIME * 10; i.e. 5*10 = 50 Seconds!
*/
#define SLEEP_TIME 5 // x10 Seconds
#define SHUTDOWN_TIME 10 // Minutes
#define SLEEP_TIME 5 // x10 Seconds
#define SHUTDOWN_TIME 0 // Minutes -- Default shutdown to being off

/**
* Auto start off for safety.
Expand Down Expand Up @@ -164,13 +164,13 @@
#define HARDWARE_MAX_WATTAGE_X10 650
#define TIP_THERMAL_MASS 65 // TODO, needs refinement
#define TIP_RESISTANCE 60 // x10 ohms, ~6 typical
#endif /* MHP30 */
#endif /* MHP30 */

#ifdef ACCEL_EXITS_ON_MOVEMENT
#define NO_SLEEP_MODE
#endif

#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
#define SETTINGS_START_PAGE (0x08000000 + (127 * 1024))

#endif /* CONFIGURATION_H_ */
2 changes: 2 additions & 0 deletions source/Core/Threads/OperatingModes/utils/SolderingCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ bool checkExitSoldering(void) {
if (shouldShutdown()) {
// shutdown
currentTempTargetDegC = 0;
lastMovementTime = xTaskGetTickCount(); // We manually move the movement time to now such that shutdown timer is reset

return true; // we want to exit soldering mode
}
#endif
Expand Down

0 comments on commit 6188190

Please sign in to comment.