|
@@ -37,7 +37,7 @@ static bool val_vibrate = false;
|
37
|
37
|
static bool val_disp_cool = false;
|
38
|
38
|
static uint16_t val_auto_shutoff = 0;
|
39
|
39
|
static uint8_t val_brightness = 0;
|
40
|
|
-static char val_fw[VOLCANO_FW_LEN] = {0};
|
|
40
|
+static char val_fw[VOLCANO_FW_LEN + 1] = {0};
|
41
|
41
|
static int32_t val_rt = 0;
|
42
|
42
|
|
43
|
43
|
void state_volcano_conf_target(bd_addr_t addr, bd_addr_type_t type) {
|
|
@@ -104,13 +104,13 @@ static void enter_cb(int selection) {
|
104
|
104
|
|
105
|
105
|
static void send_values(void) {
|
106
|
106
|
volcano_set_unit(val_celsius ? UNIT_C : UNIT_F);
|
107
|
|
- sleep_ms(150);
|
|
107
|
+ sleep_ms(250);
|
108
|
108
|
volcano_set_vibration(val_vibrate);
|
109
|
|
- sleep_ms(150);
|
|
109
|
+ sleep_ms(250);
|
110
|
110
|
volcano_set_display_cooling(val_disp_cool);
|
111
|
|
- sleep_ms(150);
|
|
111
|
+ sleep_ms(250);
|
112
|
112
|
volcano_set_auto_shutoff(val_auto_shutoff);
|
113
|
|
- sleep_ms(150);
|
|
113
|
+ sleep_ms(250);
|
114
|
114
|
volcano_set_brightness(val_brightness);
|
115
|
115
|
}
|
116
|
116
|
|
|
@@ -128,7 +128,10 @@ static void fetch_values(void) {
|
128
|
128
|
|
129
|
129
|
val_auto_shutoff = volcano_get_auto_shutoff();
|
130
|
130
|
val_brightness = volcano_get_brightness();
|
|
131
|
+
|
131
|
132
|
volcano_get_firmware(val_fw);
|
|
133
|
+ val_fw[VOLCANO_FW_LEN] = '\0';
|
|
134
|
+
|
132
|
135
|
val_rt = volcano_get_runtime();
|
133
|
136
|
}
|
134
|
137
|
|
|
@@ -169,11 +172,11 @@ static void draw(struct menu_state *menu) {
|
169
|
172
|
int pos = 0;
|
170
|
173
|
menu->length = 0;
|
171
|
174
|
|
172
|
|
- ADD_STATIC_ELEMENT("Celsius");
|
173
|
|
- ADD_STATIC_ELEMENT("Vibrate");
|
174
|
|
- ADD_STATIC_ELEMENT("Disp. Cool");
|
175
|
|
- ADD_STATIC_ELEMENT("Auto Shutoff");
|
176
|
|
- ADD_STATIC_ELEMENT("Brightness");
|
|
175
|
+ ADD_STATIC_ELEMENT("Celsius (%d)", val_celsius);
|
|
176
|
+ ADD_STATIC_ELEMENT("Vibrate (%d)", val_vibrate);
|
|
177
|
+ ADD_STATIC_ELEMENT("Disp. Cool (%d)", val_disp_cool);
|
|
178
|
+ ADD_STATIC_ELEMENT("Auto Shutoff (%d)", val_auto_shutoff / 60);
|
|
179
|
+ ADD_STATIC_ELEMENT("Brightness (%d)", val_brightness / 10);
|
177
|
180
|
ADD_STATIC_ELEMENT("FW: %s", val_fw);
|
178
|
181
|
ADD_STATIC_ELEMENT("RT: %.1f h", val_rt / 60.0f);
|
179
|
182
|
|