expand bulk data to match individual value data (#1555)

* track and return Operating mode with BLE

* move global variable to fix build on other platforms

* formatting

* expand bulk data to match individual value data

* formatting

* fix accidental single line if

---------

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
This commit is contained in:
Thomas White
2023-02-04 21:04:51 +08:00
committed by GitHub
parent 9802a622d5
commit 8e7e58018a
6 changed files with 66 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
#include "OperatingModes.h"
extern osThreadId GUITaskHandle;
extern osThreadId MOVTaskHandle;
extern osThreadId PIDTaskHandle;
extern osThreadId GUITaskHandle;
extern osThreadId MOVTaskHandle;
extern osThreadId PIDTaskHandle;
extern OperatingMode currentMode;
void showDebugMenu(void) {

View File

@@ -5,9 +5,9 @@
#define MOVEMENT_INACTIVITY_TIME (60 * configTICK_RATE_HZ)
#define BUTTON_INACTIVITY_TIME (60 * configTICK_RATE_HZ)
uint8_t buttonAF[sizeof(buttonA)];
uint8_t buttonBF[sizeof(buttonB)];
uint8_t disconnectedTipF[sizeof(disconnectedTip)];
uint8_t buttonAF[sizeof(buttonA)];
uint8_t buttonBF[sizeof(buttonB)];
uint8_t disconnectedTipF[sizeof(disconnectedTip)];
extern OperatingMode currentMode;
void renderHomeScreenAssets(void) {

View File

@@ -27,9 +27,10 @@ extern "C" {
enum OperatingMode {
idle = 0,
soldering = 1,
sleeping = 2,
settings = 3,
debug = 4
boost = 2,
sleeping = 3,
settings = 4,
debug = 5
};
void performCJCC(void); // Used to calibrate the Cold Junction offset

View File

@@ -45,6 +45,7 @@ void gui_solderingMode(uint8_t jumpToSleep) {
// if boost mode is enabled turn it on
if (getSettingValue(SettingsOptions::BoostTemp) && (getSettingValue(SettingsOptions::LockingMode) == 1)) {
boostModeOn = true;
currentMode = OperatingMode::boost;
}
break;
// fall through
@@ -63,14 +64,17 @@ void gui_solderingMode(uint8_t jumpToSleep) {
case BUTTON_NONE:
// stay
boostModeOn = false;
currentMode = OperatingMode::soldering;
break;
case BUTTON_BOTH:
case BUTTON_B_LONG:
return; // exit on back long hold
case BUTTON_F_LONG:
// if boost mode is enabled turn it on
if (getSettingValue(SettingsOptions::BoostTemp))
if (getSettingValue(SettingsOptions::BoostTemp)) {
boostModeOn = true;
currentMode = OperatingMode::boost;
}
break;
case BUTTON_F_SHORT:
case BUTTON_B_SHORT: {