Skip to content

Commit 4cdb0ea

Browse files
committed
Enable all P values for M72 command.
If any should be blocked, it should be done at the side of Sailfish.
1 parent 28f3460 commit 4cdb0ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/gpx/gpx.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2115,8 +2115,9 @@ static int queue_song(Gpx *gpx, unsigned song_id)
21152115
// song ID 0: error tone with 4 cycles
21162116
// song ID 1: done tone
21172117
// song ID 2: error tone with 2 cycles
2118+
// ... see Sailfish source for the rest.
21182119

2119-
assert(song_id <= 2);
2120+
assert(song_id <= 255);
21202121

21212122
begin_frame(gpx);
21222123

@@ -5164,7 +5165,7 @@ int gpx_convert_line(Gpx *gpx, char *gcode_line)
51645165
case 72:
51655166
if(gpx->command.flag & P_IS_SET) {
51665167
unsigned song_id = (unsigned)gpx->command.p;
5167-
if(song_id > 2) song_id = 2;
5168+
if(song_id > 255) song_id = 2;
51685169
CALL( queue_song(gpx, song_id) );
51695170
command_emitted++;
51705171
}

0 commit comments

Comments
 (0)