code fits on device

This commit is contained in:
sessionm21
2020-05-14 19:33:57 +01:00
parent 54af722760
commit 6c64120340
2 changed files with 752 additions and 12 deletions

View File

@@ -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) {
/****************************************************