meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
2.97k stars 706 forks source link

Radio Master 900 Bandit Nano Power output interpolation #4057

Closed gjelsoe closed 2 weeks ago

gjelsoe commented 2 weeks ago

The Bandit Nano uses 4 different Power levels with DAC and dBm values:

100mW -> DAC = 168, dBm = 2 250mW -> DAC = 148, dBm = 6 500mW -> DAC = 128, dBm = 9 1000mW -> DAC = 90, dBm = 12

This PR attempts to make a DAC and DB values based on dBm using interpolation to get a linear power output So entering 20 dBm will get you 100mW of output and 30 dBm will be 1000mW instead of having to change source code for different power levels.