fixes now compiles

This commit is contained in:
grcasanova
2020-07-06 10:45:55 +02:00
parent d5b8038457
commit 92b30ebec6
29 changed files with 111 additions and 76 deletions

View File

@@ -4,6 +4,7 @@
#include "PowerFSM.h"
#include "RadioInterface.h"
#include "GPS.h"
#include "timing.h"
#include <assert.h>
PhoneAPI::PhoneAPI()
@@ -20,7 +21,7 @@ void PhoneAPI::init()
void PhoneAPI::checkConnectionTimeout()
{
if (isConnected) {
bool newConnected = (millis() - lastContactMsec < radioConfig.preferences.phone_timeout_secs * 1000L);
bool newConnected = (timing::millis() - lastContactMsec < radioConfig.preferences.phone_timeout_secs * 1000L);
if (!newConnected) {
isConnected = false;
onConnectionChanged(isConnected);
@@ -34,7 +35,7 @@ void PhoneAPI::checkConnectionTimeout()
void PhoneAPI::handleToRadio(const uint8_t *buf, size_t bufLength)
{
powerFSM.trigger(EVENT_CONTACT_FROM_PHONE); // As long as the phone keeps talking to us, don't let the radio go to sleep
lastContactMsec = millis();
lastContactMsec = timing::millis();
if (!isConnected) {
isConnected = true;
onConnectionChanged(isConnected);