Permalink
Browse files

R0.5.2 - reduced update speed + DHCP warning

  • Loading branch information...
theterg committed Nov 5, 2012
1 parent 623ebeb commit 5675b8f8c5db38f618bbfc70eb982100944d8854

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -257,7 +257,12 @@ void App_WebProvisioning(void)
ClearLCD();
DisplayLCD(LCD_LINE1, "*SSID CONFIG");
- DisplayLCD(LCD_LINE4, " COMPLETE ");
+ DisplayLCD(LCD_LINE2, " COMPLETE ");
+ if (!G_nvsettings.webprov.dhcp_enable) {
+ DisplayLCD(LCD_LINE4, "WARN: ");
+ DisplayLCD(LCD_LINE5, "DHCP IS OFF ");
+ DisplayLCD(LCD_LINE6, "CHK SETTINGS");
+ }
DisplayLCD(LCD_LINE7, "Press RESET");
//while (1)
// {}
View
@@ -30,8 +30,8 @@
#include "Apps.h"
#include <jsmn/jsmn.h>
-#define UPDATE_PERIOD 1000
-#define NUM_SENSOR 3
+#define UPDATE_PERIOD 5000
+#define NUM_SENSOR 5
#define CAPABILITIES_PERIOD 10000
#define MAX_PROD_ERRORS 5
@@ -357,7 +357,7 @@ ATLIBGS_MSG_ID_E App_SwarmProducer(uint8_t cid) {
tempF);
if (r > 1)
return r;
- readForAtLeast(cid, 200);
+ readForAtLeast(cid, UPDATE_PERIOD/NUM_SENSOR);
ConsolePrintf("Light: ");
value = LightSensor_Get();
@@ -368,7 +368,7 @@ ATLIBGS_MSG_ID_E App_SwarmProducer(uint8_t cid) {
return r;
sprintf(msg, "T: %0.2fF, L: %u",tempF, value);
DisplayLCD(LCD_LINE5, msg);
- readForAtLeast(cid, 200);
+ readForAtLeast(cid, UPDATE_PERIOD/NUM_SENSOR);
ConsolePrintf("Accel: ");
Accelerometer_Get();
@@ -381,7 +381,7 @@ ATLIBGS_MSG_ID_E App_SwarmProducer(uint8_t cid) {
sprintf(msg, "A(%0.2f,%0.2f,%0.2f)",
(float)gAccData[0]/33.0, (float)gAccData[1]/33.0, (float)gAccData[2]/30.0);
DisplayLCD(LCD_LINE6, msg);
- readForAtLeast(cid, 200);
+ readForAtLeast(cid, UPDATE_PERIOD/NUM_SENSOR);
ConsolePrintf("Mic: ");
value = Microphone_Get();
@@ -392,7 +392,7 @@ ATLIBGS_MSG_ID_E App_SwarmProducer(uint8_t cid) {
mic_level);
if (r > 1)
return r;
- readForAtLeast(cid, 200);
+ readForAtLeast(cid, UPDATE_PERIOD/NUM_SENSOR);
ConsolePrintf("Pot: ");
value = Potentiometer_Get();
@@ -404,7 +404,7 @@ ATLIBGS_MSG_ID_E App_SwarmProducer(uint8_t cid) {
return r;
sprintf(msg, "P: %u M: %u", value/4, mic_level);
DisplayLCD(LCD_LINE7, msg);
- readForAtLeast(cid, 200);
+ readForAtLeast(cid, UPDATE_PERIOD/NUM_SENSOR);
//Every 5th iteration of the loop, send a capabilities message
//Not necessary for network portal, but for demo.bugswarm.net
View
@@ -5516,7 +5516,7 @@ ATLIBGS_MSG_ID_E AtLibGs_GetWebProvSettings(
if (wp->dhcp_enable) {
done = true;
break;
- }
+ }
} else if (strcmp(line, "STATIC_IP") == 0) {
AtLibGs_ParseIPv4Address(p, &wp->ip);
} else if (strcmp(line, "SUBNT_MASK") == 0) {
Oops, something went wrong.

0 comments on commit 5675b8f

Please sign in to comment.