Skip to content

Commit dbdb616

Browse files
Damien Laidinjoextodd
authored andcommitted
fix compilation of mxchip
1 parent d124c5d commit dbdb616

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/MXChipSendReceive/MXChipSendReceive.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void payload_to_hex(char *payload, int payload_length, char *hex_str)
9595
{
9696
sprintf(hex_str + i * 2, "%02x", payload[i]);
9797
}
98-
hex_str[payload_length * 2] = '\\0';
98+
hex_str[payload_length * 2] = '\0';
9999
}
100100

101101
/*
@@ -154,7 +154,7 @@ void on_sending_callback(void *data, uint8_t *payload, size_t length, uint8_t ch
154154
void on_sent_callback(void *data, uint8_t *payload, size_t length, uint8_t channel)
155155
{
156156
char identifier[length * 2 + 1];
157-
payload_to_hex(payload, length, identifier);
157+
payload_to_hex((char *) payload, length, identifier);
158158
char strLength[8] = {0};
159159
itoa(length, strLength, 10);
160160
Screen.clean();
@@ -181,7 +181,7 @@ void on_received_callback(void *data, uint8_t *payload, size_t length, uint8_t c
181181
if (payload && length != 0)
182182
{
183183
char identifier[length * 2 + 1];
184-
payload_to_hex(payload, length, identifier);
184+
payload_to_hex((char *) payload, length, identifier);
185185
char strLength[8] = {0};
186186
itoa(length, strLength, 10);
187187
Screen.clean();
@@ -227,7 +227,7 @@ void setup()
227227
printf("Config set correctly\n");
228228

229229
char *info = chirp_sdk_get_info(chirp);
230-
printf("%s - V%s\n", info, chirp_sdk_get_version());
230+
printf("%s - V%s [%s]\n", info, chirp_sdk_get_version(), chirp_sdk_get_build_number());
231231
chirp_sdk_free(info);
232232

233233
errorCode = chirp_sdk_set_input_sample_rate(chirp, SAMPLE_RATE);
@@ -261,7 +261,7 @@ void setup()
261261
printf("SDK started\n");
262262

263263
Screen.clean();
264-
Screen.print(0, "Chirp C SDK");
264+
Screen.print(0, "Chirp Arduino");
265265
Screen.print(1, "Listening ...");
266266

267267
// Setup the audio class and start recording.

0 commit comments

Comments
 (0)