on7lds / NextionDriver

Driver program to connect MMDVMhost with Nextion Displays, adding extra functionality
33 stars 33 forks source link

CPU Temp not localized #18

Closed rd0fun closed 3 years ago

rd0fun commented 3 years ago

I struggled with this for some time. My Nextion would display degrees C, then update to degree F, then return to C. I have set rpi localization options for USA. I have set "TempInFarenheit=1" in mmdvmhost on pi-star. Etc.

I could not get this to stay as degrees F !!

Then I looked at basicFunctions.c and I uncommented the temp conversion lines, recompiled, and VOILA!

Would it be possible to change the NextionDriver and the installer so that the locale is identified, and a NextionDriver binary is compiled and installed by the NextionDriverInstaller that respects the localized temp settings?

Thanks!

Others may be just as confused by this as I was. I know a few people that were! ;-)

on7lds commented 3 years ago

The code to handle the temperature which was originally introduced in NextionDriver, was included in MMDVMHost at some point. I then excluded it from NextionDriver with the possibility to include it by means of a conditional compile (#define XTRA in NextionDriver.h) Somehow that #define has been uncommented again and therefore NextionDriver also was sending temperatures.

I commented it again, so that should have been solved.