Skip to content

Commit

Permalink
disconnection fixes and led fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bugvish committed Jun 2, 2014
1 parent 5d925c3 commit f58f2e6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Apps/App_Dweet.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void App_DweetConnector(void)
char* animationIndex = animation;

while(1) {
if (!AtLibGs_IsNodeAssociated()) {
if (!AtLibGs_IsNodeAssociated() || !connected) {
DisplayLCD(LCD_LINE8, "connecting.......");
App_aClientConnection();
AtLibGs_SetNodeAssociationFlag();
Expand Down Expand Up @@ -170,8 +170,10 @@ void App_DweetConnector(void)
MSTimerDelay(500);
}

AtLibGs_Close(cid);
//AtLibGs_Close(cid);
AtLibsGs_CloseAll();
cid = ATLIBGS_INVALID_CID;
AtLibGs_ClearNodeAssociationFlag();
DisplayLCD(LCD_LINE8, "connecting.......");
MSTimerDelay(5000); //TODO - exponential backoff
}
Expand Down Expand Up @@ -266,10 +268,10 @@ ATLIBGS_MSG_ID_E checkData(uint8_t* cid)
val = atoi(body+tokens[ledUpdate].start+3);
if (body[tokens[ledUpdate+1].start] == 't') {
ConsolePrintf("LED %d ON\n", val);
led_on(val);
led_on(val-3);
} else {
ConsolePrintf("LED %d OFF\n", val);
led_off(val);
led_off(val-3);
}
}
}
Expand Down

0 comments on commit f58f2e6

Please sign in to comment.