@@ -39,6 +39,8 @@ class CommandVals(IntEnum):
39
39
InvertScreen = 0x15
40
40
SetPixelColumn = 0x16
41
41
FlushFramebuffer = 0x17
42
+ ClearRam = 0x18
43
+ ScreenSaver = 0x19
42
44
Version = 0x20
43
45
44
46
@@ -192,6 +194,8 @@ def main():
192
194
action = argparse .BooleanOptionalAction )
193
195
parser .add_argument ("--invert-screen" , help = "Invert display" ,
194
196
action = argparse .BooleanOptionalAction )
197
+ parser .add_argument ("--screen-saver" , help = "Turn on/off screensaver" ,
198
+ action = argparse .BooleanOptionalAction )
195
199
parser .add_argument ("--b1image" , help = "On the B1 display, show a PNG or GIF image in black and white only)" ,
196
200
type = argparse .FileType ('rb' ))
197
201
@@ -256,7 +260,7 @@ def main():
256
260
snake_embedded ()
257
261
elif args .game_of_life_embedded is not None :
258
262
game_of_life_embedded (args .game_of_life_embedded )
259
- elif args .quit_embedded_game is not None :
263
+ elif args .quit_embedded_game :
260
264
send_command (CommandVals .GameControl , [GameControlVal .Quit ])
261
265
elif args .pong_embedded :
262
266
pong_embedded ()
@@ -276,6 +280,8 @@ def main():
276
280
display_on_cmd (args .display_on )
277
281
elif args .invert_screen is not None :
278
282
invert_screen_cmd (args .invert_screen )
283
+ elif args .screen_saver is not None :
284
+ screen_saver_cmd (args .screen_saver )
279
285
elif args .b1image is not None :
280
286
b1image_bl (args .b1image )
281
287
elif args .version :
@@ -1063,6 +1069,10 @@ def invert_screen_cmd(invert):
1063
1069
send_command (CommandVals .InvertScreen , [invert ])
1064
1070
1065
1071
1072
+ def screen_saver_cmd (on ):
1073
+ send_command (CommandVals .ScreenSaver , [on ])
1074
+
1075
+
1066
1076
# 5x6 symbol font. Leaves 2 pixels on each side empty
1067
1077
# We can leave one row empty below and then the display fits 5 of these digits.
1068
1078
0 commit comments