From 4cdb0ead6dba90aaae91a6b33fa082f2617babc0 Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Sat, 21 Apr 2018 23:22:12 +0200 Subject: [PATCH] Enable all P values for M72 command. If any should be blocked, it should be done at the side of Sailfish. --- src/gpx/gpx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gpx/gpx.c b/src/gpx/gpx.c index 2e8a22a..7e4a1cd 100644 --- a/src/gpx/gpx.c +++ b/src/gpx/gpx.c @@ -2115,8 +2115,9 @@ static int queue_song(Gpx *gpx, unsigned song_id) // song ID 0: error tone with 4 cycles // song ID 1: done tone // song ID 2: error tone with 2 cycles + // ... see Sailfish source for the rest. - assert(song_id <= 2); + assert(song_id <= 255); begin_frame(gpx); @@ -5164,7 +5165,7 @@ int gpx_convert_line(Gpx *gpx, char *gcode_line) case 72: if(gpx->command.flag & P_IS_SET) { unsigned song_id = (unsigned)gpx->command.p; - if(song_id > 2) song_id = 2; + if(song_id > 255) song_id = 2; CALL( queue_song(gpx, song_id) ); command_emitted++; }