G4lile0 / tinyGS

📡 Open Ground Station Network 🛰
GNU General Public License v3.0
925 stars 178 forks source link

Definition of millis() is incorrect in multiple places #18

Closed lillefyr closed 4 years ago

lillefyr commented 4 years ago

Sorry no pullrequest. If you require that please let me know, and I'll set it up.

The issue: millis() returns "unsigned long"

Return value is defined different in several places. Don't know why it doesnt cause an error. List of files where it occurs. I have changed the values in my own copy and it works like before.

./src/Fossa_GroundStation/config_manager.cpp: time_t start_connect = millis ();

./src/Fossa_GroundStation/Fossa_GroundStation.ino: time_t start_waiting_for_button = millis (); ./src/Fossa_GroundStation/Fossa_GroundStation.ino: time_t button_pushed_at;

This could maybe work, except for the second line ./src/Fossa_GroundStation/Fossa_GroundStation.ino: static unsigned long last_connection_fail = millis(); ./src/Fossa_GroundStation/Fossa_GroundStation.ino: last_connection_fail = millis();

./src/Fossa_GroundStationAsbjorn/config_manager.cpp: time_t start_connect = millis ();

G4lile0 commented 4 years ago

Thanks lillefyr, :+1: Good advice, fixed: https://github.com/G4lile0/ESP32-OLED-Fossa-GroundStation/commit/5659e8fc9545970d6b64047bcd754cdbd4748967