diff --git a/lua/menu.lua b/lua/menu.lua index b84d0c862..add393616 100644 --- a/lua/menu.lua +++ b/lua/menu.lua @@ -1344,6 +1344,8 @@ m.key[pSLEEP] = function(n,z) --TODO fade out screen then run the shutdown script m.sleep = true menu.redraw() + norns.state.save() + if tape.mode == tREC then tape_stop_rec() end norns.audio.output_level(-100) gain_hp(0) --norns.audio.set_audio_level(0) diff --git a/matron/src/hardware/battery.c b/matron/src/hardware/battery.c index b1bd6c044..6c850ff5b 100644 --- a/matron/src/hardware/battery.c +++ b/matron/src/hardware/battery.c @@ -59,7 +59,7 @@ void *battery_check(void *x) { if (read(fd[0], &buf, 4) > 0) { percent = atoi(buf); } else { - fprintf(stderr, "failed to read battery percentage\n"); + //fprintf(stderr, "failed to read battery percentage\n"); percent = -1; } @@ -67,7 +67,7 @@ void *battery_check(void *x) { if (read(fd[1], &buf, 1) > 0) { n = (buf[0] == 'C'); // Charging } else { - fprintf(stderr, "failed to read battery charging status\n"); + //fprintf(stderr, "failed to read battery charging status\n"); n = 0; } @@ -82,7 +82,7 @@ void *battery_check(void *x) { if (read(fd[2], &buf, 7) > 0) { n = atoi(buf) / 1000; } else { - fprintf(stderr, "failed to read battery current\n"); + //fprintf(stderr, "failed to read battery current\n"); n = -1; }