FIXUP! Fix typo's
.
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
#endif
|
||||
|
||||
extern TickType_t lastMovementTime;
|
||||
extern OperatingMode currentMode;
|
||||
extern OperatingMode currentOperatingMode;
|
||||
|
||||
int ble_char_read_status_callback(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, u16_t len, u16_t offset) {
|
||||
if (attr == NULL || attr->uuid == NULL) {
|
||||
@@ -123,7 +123,7 @@ int ble_char_read_status_callback(struct bt_conn *conn, const struct bt_gatt_att
|
||||
break;
|
||||
case 13:
|
||||
// Operating mode
|
||||
temp = currentMode;
|
||||
temp = (uint32_t)currentOperatingMode;
|
||||
memcpy(buf, &temp, sizeof(temp));
|
||||
return sizeof(temp);
|
||||
break;
|
||||
@@ -162,7 +162,7 @@ int ble_char_read_bulk_value_callback(struct bt_conn *conn, const struct bt_gatt
|
||||
TipThermoModel::getTipMaxInC(), // 9 - max temp
|
||||
TipThermoModel::convertTipRawADCTouV(getTipRawTemp(0), true), // 10 - Raw tip in μV
|
||||
abs(getRawHallEffect()), // 11 - hall sensor
|
||||
currentMode, // 12 - Operating mode
|
||||
(uint32_t)currentOperatingMode, // 12 - Operating mode
|
||||
x10WattHistory.average(), // 13 - Estimated Wattage *10
|
||||
};
|
||||
int lenToCopy = sizeof(bulkData) - offset;
|
||||
|
||||
@@ -105,6 +105,7 @@ void guiRenderLoop(void) {
|
||||
newMode = performCJCC(buttons, &context);
|
||||
break;
|
||||
case OperatingMode::SettingsMenu:
|
||||
newMode = gui_SettingsMenu(buttons, &context);
|
||||
break;
|
||||
case OperatingMode::InitialisationDone:
|
||||
newMode = handle_post_init_state();
|
||||
|
||||
@@ -18,7 +18,7 @@ OperatingMode showDebugMenu(const ButtonState buttons, guiContext *cxt) {
|
||||
// If device has validation code; then we want to take over both lines of the screen
|
||||
OLED::clearScreen(); // Ensure the buffer starts clean
|
||||
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
|
||||
OLED::print(DebugMenu[screen], FontStyle::SMALL);
|
||||
OLED::print(DebugMenu[cxt->scratch_state.state1], FontStyle::SMALL);
|
||||
OLED::drawHex(getDeviceValidation(), FontStyle::SMALL, 8);
|
||||
OLED::setCursor(0, 8); // second line
|
||||
#endif
|
||||
|
||||
@@ -21,13 +21,10 @@ void renderHomeScreenAssets(void) {
|
||||
}
|
||||
|
||||
OperatingMode handleHomeButtons(const ButtonState buttons, guiContext *cxt) {
|
||||
if (buttons != BUTTON_NONE) {
|
||||
OLED::setDisplayState(OLED::DisplayState::ON);
|
||||
}
|
||||
if (buttons != BUTTON_NONE && cxt->scratch_state.state1 == 0) {
|
||||
return OperatingMode::HomeScreen; // Ignore button press
|
||||
} else {
|
||||
cxt->scratch_state.state1 == 1;
|
||||
cxt->scratch_state.state1 = 1;
|
||||
}
|
||||
switch (buttons) {
|
||||
case BUTTON_NONE:
|
||||
@@ -46,7 +43,6 @@ OperatingMode handleHomeButtons(const ButtonState buttons, guiContext *cxt) {
|
||||
}
|
||||
#else
|
||||
return OperatingMode::TemperatureAdjust;
|
||||
saveSettings();
|
||||
#endif
|
||||
break;
|
||||
case BUTTON_F_SHORT:
|
||||
|
||||
@@ -3,6 +3,8 @@ OperatingMode gui_SettingsMenu(const ButtonState buttons, guiContext *cxt) {
|
||||
// Render out the current settings menu
|
||||
// State 1 -> Root menu
|
||||
// State 2 -> Sub entry
|
||||
uint16_t *mainEntry = &(cxt->scratch_state.state1);
|
||||
uint16_t *subEntry = &(cxt->scratch_state.state2);
|
||||
|
||||
return OperatingMode::HomeScreen;
|
||||
}
|
||||
Reference in New Issue
Block a user