Assistance with converting HEX value to DECIMAL for conversion to supply voltage

visiondrive5 years ago

I want to create a custom attribute for a device that provides values in HEX and I want to convert to decimal before applying a formula to provide VDC

For example this sensor reports the voltage of the supply in HEX

Adc3 274

Which is 628 Decimal

I can then take this value and via the trackers manufacturers notes convert to VDC by

(628/1028)*48 = 29.32 VDC

visiondrive5 years ago

Never mind - traccar already reports in decimal value...dumbo me.