aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-07-21 15:46:13 -0600
committerSelene ToyKeeper2023-07-21 15:46:13 -0600
commitb53000bb197027478927a4155418aa32112eee31 (patch)
treef5c426817523d9fa1d683194d64ebb65d2f44caf
parentforgot this file in previous commit (diff)
downloadanduril-b53000bb197027478927a4155418aa32112eee31.tar.gz
anduril-b53000bb197027478927a4155418aa32112eee31.tar.bz2
anduril-b53000bb197027478927a4155418aa32112eee31.zip
fixed default channel mode after using factory reset with colors
Diffstat (limited to '')
-rw-r--r--spaghetti-monster/anduril/factory-reset.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/spaghetti-monster/anduril/factory-reset.c b/spaghetti-monster/anduril/factory-reset.c
index 1e9714a..f9fb472 100644
--- a/spaghetti-monster/anduril/factory-reset.c
+++ b/spaghetti-monster/anduril/factory-reset.c
@@ -33,6 +33,11 @@ void factory_reset() {
}
// explode, if button pressed long enough
if (reset) {
+ #if defined(FACTORY_RESET_WARN_CHANNEL) && defined(DEFAULT_CHANNEL_MODE)
+ // return to default channel before saving
+ set_channel_mode(DEFAULT_CHANNEL_MODE);
+ #endif
+
// auto-calibrate temperature
// AVR 1-Series has factory calibrated thermal sensor, always remove the offset on reset
#if defined(USE_THERMAL_REGULATION) && defined(AVRXMEGA3)
@@ -43,11 +48,6 @@ void factory_reset() {
thermal_config_save(1, 21);
#endif
- #if defined(FACTORY_RESET_WARN_CHANNEL) && defined(DEFAULT_CHANNEL_MODE) && (FACTORY_RESET_WARN_CHANNEL != DEFAULT_CHANNEL_MODE)
- // return to default channel before saving
- set_channel_mode(DEFAULT_CHANNEL_MODE);
- #endif
-
// save all settings to eeprom
// (assuming they're all at default because we haven't loaded them yet)
save_config();