Skip to content

Commit

Permalink
Clean up warnings in compliance sketch, more AVR-isms
Browse files Browse the repository at this point in the history
  • Loading branch information
terrillmoore committed Sep 11, 2019
1 parent 467d137 commit af0f23b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/lmic/lmic_compliance.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ static lmic_event_cb_t lmicEventCb;
static lmic_txmessage_cb_t sendUplinkCompleteCb;
static osjobcbfn_t timerExpiredCb;

/* this is declared global so the optimizer can chuck it without warnings */
/* these are declared global so the optimizer can chuck them without warnings */
const char *LMICcompliance_txSuccessToString(int fSuccess);
const char * LMICcompliance_fsmstate_getName(lmic_compliance_fsmstate_t state);

/****************************************************************************\
|
Expand Down Expand Up @@ -386,8 +387,6 @@ Name: evEchoCommand()
*/

static lmic_txmessage_cb_t evEchoCommandCb;

static void evEchoCommand(
const uint8_t *pMessage,
size_t nMessage
Expand Down Expand Up @@ -439,7 +438,7 @@ Name: fsmEval()
*/

static const char * lmic_compliance_fsmstate_Getname(lmic_compliance_fsmstate_t state) {
const char * LMICcompliance_fsmstate_getName(lmic_compliance_fsmstate_t state) {
const char * const names[] = { LMIC_COMPLIANCE_FSMSTATE__NAMES };

if ((unsigned) state >= sizeof(names)/sizeof(names[0]))
Expand Down Expand Up @@ -497,8 +496,8 @@ static void fsmEval(void) {
// state change!
LMIC_COMPLIANCE_PRINTF("%s: change state %s(%u) => %s(%u)\n",
__func__,
lmic_compliance_fsmstate_Getname(oldState), (unsigned) oldState,
lmic_compliance_fsmstate_Getname(newState), (unsigned) newState
LMICcompliance_fsmstate_getName(oldState), (unsigned) oldState,
LMICcompliance_fsmstate_getName(newState), (unsigned) newState
);
fNewState = true;
LMIC_Compliance.fsmState = newState;
Expand Down

0 comments on commit af0f23b

Please sign in to comment.