code fits on device
This commit is contained in:
27
collar.cpp
27
collar.cpp
@@ -326,6 +326,9 @@ void do_send(osjob_t* j){
|
||||
|
||||
float latitude = 123;
|
||||
float longitude = 456;
|
||||
|
||||
latitude = 44.558308;
|
||||
longitude = -123.28341;
|
||||
|
||||
memcpy(buffer+3, (void*)&latitude, 4);
|
||||
memcpy(buffer+8, (void*)&longitude, 4);
|
||||
@@ -438,22 +441,22 @@ void loop() {
|
||||
state = WAITING_GPS;
|
||||
}
|
||||
else if(state == WAITING_GPS) {
|
||||
//int got_data =
|
||||
read_gps();
|
||||
int got_data =
|
||||
read_gps();
|
||||
/****************************************************
|
||||
* loading bar animation
|
||||
***************************************************/
|
||||
//if(got_data) {
|
||||
// if(loopCounter%100==0)
|
||||
// Serial.write('.');
|
||||
if(loopCounter>PROGRESS_BAR_COUNT*100) {
|
||||
// clear_line();
|
||||
// loopCounter=0;
|
||||
//
|
||||
state = VERIFYING_GPS;
|
||||
if(got_data) {
|
||||
if(loopCounter%100==0)
|
||||
Serial.write('.');
|
||||
if(loopCounter>PROGRESS_BAR_COUNT*100) {
|
||||
clear_line();
|
||||
loopCounter=0;
|
||||
|
||||
state = VERIFYING_GPS;
|
||||
}
|
||||
loopCounter++;
|
||||
}
|
||||
// loopCounter++;
|
||||
//}
|
||||
}
|
||||
else if(state == VERIFYING_GPS) {
|
||||
/****************************************************
|
||||
|
||||
Reference in New Issue
Block a user