fix: config_version valid check

This commit is contained in:
awalol
2026-05-16 13:25:11 +08:00
parent 908bace5c4
commit 7d176f5034
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -79,6 +79,10 @@ void config_valid() {
body->controller_mode = 2;
printf("[Config] controller_mode is invalid\n");
}
if (body->config_version != CONFIG_VERSION) {
body->config_version = CONFIG_VERSION;
printf("[Config] Warning: Config may breking change\n");
}
}
void config_load() {
+1 -1
View File
@@ -8,7 +8,7 @@
#include <cstdint>
struct __attribute__((packed)) Config_body {
uint8_t config_version = 1; // Config Version
uint8_t config_version; // Config Version
float haptics_gain; // [1.0,2.0]
float speaker_volume; // [-100,0]
uint8_t inactive_time; // [10,60] min