Merge pull request #3 from Max-Plastix/ublox-gps

Ublox gps
pull/6/head
Max-Plastix 2021-12-18 12:12:12 -08:00 zatwierdzone przez GitHub
commit c31f51cf10
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 11 dodań i 4 usunięć

Wyświetl plik

@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// -----------------------------------------------------------------------------
#define APP_NAME "Helium TTGO"
#define APP_VERSION "1.4.3 MaxP"
#define APP_VERSION "1.4.4 MaxP"
// -----------------------------------------------------------------------------
// Configuration

Wyświetl plik

@ -127,19 +127,25 @@ bool trySend()
screen_print(buffer);
#endif
char now_justsend = ' ';
char now_distance = ' ';
char now_stationary = ' ';
if (justSendNow)
{
justSendNow = false;
Serial.println("** JUST_SEND_NOW");
now_justsend = '>';
}
else if (dist_moved > min_dist_moved)
{
Serial.println("** MOVING");
last_moved_millis = millis();
now_distance = '!';
}
else if (millis() - last_send_millis > tx_interval_ms)
{
Serial.println("** STATIONARY_TX");
now_stationary = '!';
}
else
{
@ -150,9 +156,10 @@ bool trySend()
// The first distance-moved is crazy, since has no origin.. don't put it on screen.
if (dist_moved < 1000000) {
snprintf(buffer, sizeof(buffer), "%lus %.0fm (%lus %0.fm)",
(millis()-last_send_millis)/1000, dist_moved,
tx_interval_ms/1000, min_dist_moved);
snprintf(buffer, sizeof(buffer), "%c%lus%c %.0fm%c",
now_justsend,
(millis() - last_send_millis) / 1000, now_stationary,
dist_moved, now_distance);
screen_print(buffer);
}