From 1f3c1fa07afb58b276bcd128677c7c6ea6476569 Mon Sep 17 00:00:00 2001 From: CInsights Date: Tue, 17 Apr 2018 19:33:36 +1000 Subject: [PATCH] Small fix to ?aprsh command. --- tracker/software/config.c | 12 ++++++------ tracker/software/pkt/channels/rxafsk.c | 8 +++++++- tracker/software/protocols/packet/aprs.c | 18 +++++++++++++----- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/tracker/software/config.c b/tracker/software/config.c index 3abe594a..e04ad840 100644 --- a/tracker/software/config.c +++ b/tracker/software/config.c @@ -55,7 +55,7 @@ const conf_t conf_flash_default = { // Primary image transmission thread .img_pri = { .thread_conf = { - .active = true, + .active = false, .cycle = TIME_S2I(60*5), .init_delay = TIME_S2I(60*5), .send_spacing = TIME_S2I(5) @@ -79,10 +79,10 @@ const conf_t conf_flash_default = { // Secondary image transmission thread .img_sec = { .thread_conf = { - .active = false, - .cycle = TIME_S2I(600), - .init_delay = TIME_S2I(20), - .send_spacing = TIME_MS2I(100) + .active = true, + .cycle = TIME_S2I(300), + .init_delay = TIME_S2I(60), + .send_spacing = TIME_S2I(30) }, .radio_conf = { .pwr = 0x7F, @@ -94,7 +94,7 @@ const conf_t conf_flash_default = { .call = "VK2GJ-15", .path = "", - .res = RES_VGA, + .res = RES_QVGA, .quality = 4, .buf_size = 64*1024 }, diff --git a/tracker/software/pkt/channels/rxafsk.c b/tracker/software/pkt/channels/rxafsk.c index 9063b3a0..d781d381 100644 --- a/tracker/software/pkt/channels/rxafsk.c +++ b/tracker/software/pkt/channels/rxafsk.c @@ -906,7 +906,13 @@ THD_FUNCTION(pktAFSKDecoder, arg) { radio_cca_fifo_t *myFIFO = myDriver->active_demod_object; if(myFIFO != NULL) { - /* Wait for queue object to be released by PWM. */ + /* + * Wait for queue object to be released by PWM. + * Normally this is the case. + * If can be a forced release by semaphore reset. + * TODO: This may happen if the watchdog system forces reset. + * TBD. + */ (void)chBSemWait(&myFIFO->sem); #if USE_HEAP_PWM_BUFFER == TRUE diff --git a/tracker/software/protocols/packet/aprs.c b/tracker/software/protocols/packet/aprs.c index 40479f0f..e1e0d6fa 100644 --- a/tracker/software/protocols/packet/aprs.c +++ b/tracker/software/protocols/packet/aprs.c @@ -189,7 +189,10 @@ const APRSCommand aprs_commands[] = { }; /* - * Parse command arguments from aprs message. + * @brief parse arguments from a command string. + * + * @return pointer to next element in string. + * @retval NULL if end. */ static char *aprs_parse_arguments(char *str, char **saveptr) { char *p; @@ -225,9 +228,14 @@ static char *aprs_parse_arguments(char *str, char **saveptr) { } /* - * Execute a command found in an aprs message. - * Return result of command. - * False means either command failed or does not exist. + * @brief Execute a command in an APRS message. + * @notes Known commands are in APRS command table. + * @notes Commands themselves return only MSG_OK or MSG_ERROR. + * + * @return result of command. + * @retval MSG_OK if the command completed. + * @retval MSG_ERROR if there was an error in command execution. + * @retval MSG_TIMEOUT if the command was not found in known commands. */ static msg_t aprs_cmd_exec(const APRSCommand *acp, char *name, @@ -502,7 +510,7 @@ msg_t aprs_send_aprsh_message(aprs_identity_t *id, } if(out == 0) { out = chsnprintf(buf, sizeof(buf), - "%s not heard", heard_list[i].call); + "%s not heard", argv[0]); } } packet_t pp = aprs_encode_message(id->call, id->path, id->src, buf, false);