DeuxVis / Lora-TTNMapper-T-Beam

TTNMapper on the TTGO T-Beam
GNU General Public License v3.0
109 stars 47 forks source link

TX only above certain speed #15

Closed HaViGit closed 5 years ago

HaViGit commented 5 years ago

Hi,

Working with your software I intend to send the data with an interval of 60 seconds but only if the speed is above a certain value like >=5 kmh. I've tried so many options like:

if (actualSpeed >= 5 { do_send(&sendjob); }

but without success so far. Above code even results in not sending at all. I realize deepsleep can't be used because the speed needs to be monitored constantly but powering is not an issue in my case.

Can you help me to realize this?

Best regards, Hans.

DeuxVis commented 5 years ago

Hello,

Someone have already managed to do something similar - interval of transmission changing with the measured speed : https://github.com/tekk/TTGO-T-Beam-Car-Tracker/blob/122d8efc2ebc57445a80581974c6d5670329dfc0/TTGO-T-Beam-Car-Tracker.ino#L150

I suggest you try to take inspiration from that as my free time for is project is currently approaching zero. Good luck, have fun !

HaViGit commented 5 years ago

Thanks!