Merge branch 'master' into rcarteraz-patch-1

This commit is contained in:
rcarteraz 2024-03-01 21:43:22 -07:00 committed by GitHub
commit 4cce2aeb97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 61 additions and 59 deletions

View file

@ -17,7 +17,7 @@ Meshtastic is **not** LoRaWAN, Helium or TTN (TheThingsNetwork). Meshtastic uses
Power limits will generally be lifted in the software if `is_licensed` is set to `true`. See [HAM Mode](/docs/faq#amateur-radio-ham) for more information. Power limits will generally be lifted in the software if `is_licensed` is set to `true`. See [HAM Mode](/docs/faq#amateur-radio-ham) for more information.
::: :::
## Channel Frequency Calculator ## Frequency Slot Calculator
<FrequencyCalculator /> <FrequencyCalculator />

View file

@ -100,13 +100,9 @@ Allows you to enable and disable transmit (TX) from the LoRa radio. Useful for h
Defaults to true Defaults to true
### Channel Number ### Frequency Slot
This is controlling the actual hardware frequency the radio is transmitting on. A channel number between 1 and NUM_CHANNELS (whatever the max is in the current region). If this is ZERO/UNSET then the rule is "use the old channel name hash based algorithm to derive the channel number". This setting controls the actual hardware frequency at which the radio transmits, represented by a frequency slot between 1 and NUM_SLOTS (the maximum for the current region and modem preset). If set to `0`/UNSET, the device reverts to the older channel name hash-based algorithm for determining the frequency slot.
:::info
LoRa Channel Configuration should not to be confused with messaging [Channel Configuration](/docs/configuration/radio/channels). See [Chat Channels VS Lora Modem Channels](/docs/configuration/tips#chat-channels-vs-lora-modem-channels) for further clarification.
:::
### Ignore Incoming Array ### Ignore Incoming Array

View file

@ -4,20 +4,17 @@ title: Power Configuration
sidebar_label: Power sidebar_label: Power
--- ---
import Admonition from '@theme/Admonition';
import Tabs from "@theme/Tabs"; import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem"; import TabItem from "@theme/TabItem";
import calculateADC from "/src/utils/calculateADC"; import calculateADC from "/src/utils/calculateADC";
:::info :::info Use Device Config first
Power settings are advanced configuration, most users should choose a role under [Device Config](/docs/configuration/radio/device) to manage power for their device and shouldn't ever need to adjust these settings. Power settings are advanced configuration, most users should choose a role under [Device Config](/docs/configuration/radio/device) to manage power for their device and shouldn't ever need to adjust these settings.
::: :::
The power config options are: Power Saving, Shutdown after losing power, ADC Multiplier Override, Wait Bluetooth Interval, Light Sleep Interval, Minimum Wake Interval, and Device Battery INA2xx Address. Power config uses an admin message sending a `Config.Power` protobuf. The power config options are: Power Saving, Shutdown after losing power, ADC Multiplier Override, Wait Bluetooth Interval, Light Sleep Interval, Minimum Wake Interval, and Device Battery INA2xx Address. Power config uses an admin message sending a `Config.Power` protobuf.
:::info
ADC Multiplier, The Light Sleep setting only applies to ESP32-based boards. This settings will have no effect on nRF52/RP2040 modules.
:::
## Power Config Values ## Power Config Values
### Power Saving ### Power Saving
@ -30,6 +27,10 @@ Automatically shut down a device after a defined time period if power is lost.
### ADC Multiplier Override ### ADC Multiplier Override
:::info ESP32 Only
This setting only applies to ESP32-based boards, it will have no effect on nRF52/RP2040 boards.
:::
Ratio of voltage divider for battery pin e.g. 3.20 (R1=100k, R2=220k) Ratio of voltage divider for battery pin e.g. 3.20 (R1=100k, R2=220k)
Overrides the ADC_MULTIPLIER defined in the firmware device variant file for battery voltage calculation. Overrides the ADC_MULTIPLIER defined in the firmware device variant file for battery voltage calculation.
@ -44,49 +45,50 @@ Should be set to floating point value between 2 and 6
4. If "Battery Charge Percent" (e.g., B 3.82V 60%) is not displayed on the screen, it means that the default value of "Operative Adc Multiplier" is too high. Lower the "Operative Adc Multiplier" to a smaller number (it is recommended to decrease by 0.1) until the screen displays "Battery Charge Percent". Enter the current "Operative Adc Multiplier" in use into the "Operative Adc Multiplier" field in the calculator. Also, input the "Battery Charge Percent" displayed on the screen into the calculator. 4. If "Battery Charge Percent" (e.g., B 3.82V 60%) is not displayed on the screen, it means that the default value of "Operative Adc Multiplier" is too high. Lower the "Operative Adc Multiplier" to a smaller number (it is recommended to decrease by 0.1) until the screen displays "Battery Charge Percent". Enter the current "Operative Adc Multiplier" in use into the "Operative Adc Multiplier" field in the calculator. Also, input the "Battery Charge Percent" displayed on the screen into the calculator.
5. Click the "Calculate" button to compute the "Calculated New Operative Adc Multiplier", and set it as the new "Operative Adc Multiplier" for the device. 5. Click the "Calculate" button to compute the "Calculated New Operative Adc Multiplier", and set it as the new "Operative Adc Multiplier" for the device.
:::tip ADC Calculator <details>
<summary>ADC Calculator</summary>
<table> <div>
<tr> <Admonition type="info">
<td> Battery Charge Percent: </td> <p>This calibration method only maps 4.2V to Battery Charge Percent 100%, and does not address the potential non-linearities of the ADC.</p>
<td> </Admonition>
<input type="text" id="batteryChargePercent" defaultValue="65" /> <table>
</td> <tr>
</tr> <td> Battery Charge Percent: </td>
<tr> <td>
<td>Current Adc Multiplier: </td> <input type="text" id="batteryChargePercent" defaultValue="65" />
<td> </td>
<input type="text" id="operativeAdcMultiplier" defaultValue="2" /> </tr>
</td> <tr>
</tr> <td>Current Adc Multiplier: </td>
<tr> <td>
<td>Calculated New Operative Adc Multiplier: </td> <input type="text" id="operativeAdcMultiplier" defaultValue="2" />
<td> </td>
<input </tr>
type="text" <tr>
id="newOperativeAdcMultiplier" <td>Calculated New Operative Adc Multiplier: </td>
value="2" <td>
disabled="disabled" <input
/> type="text"
</td> id="newOperativeAdcMultiplier"
</tr> value="2"
<tr> disabled="disabled"
<td></td> />
<td> </td>
<button </tr>
className="button button--outline button--lg cta--button" <tr>
onClick={calculateADC} <td></td>
> <td>
Calculate <button
</button> className="button button--outline button--lg cta--button"
</td> onClick={calculateADC}
</tr> >
</table> Calculate
::: </button>
</td>
:::info </tr>
It's important to note that this calibration method only maps 4.2V to Battery Charge Percent 100%, and does not address the potential non-linearities of the ADC. </table>
::: </div>
</details>
### Wait Bluetooth Interval ### Wait Bluetooth Interval
@ -96,6 +98,10 @@ How long to wait before turning off BLE in no Bluetooth states
### Light Sleep Interval ### Light Sleep Interval
:::info ESP32 Only
This setting only applies to ESP32-based boards, it will have no effect on nRF52/RP2040 boards.
:::
In light sleep the CPU is suspended, LoRa radio is on, BLE is off and GPS is on In light sleep the CPU is suspended, LoRa radio is on, BLE is off and GPS is on
`0` for default of five minutes `0` for default of five minutes
@ -110,7 +116,7 @@ While in light sleep when we receive packets on the LoRa radio we will wake and
If an INA-2XX device is auto-detected on one of the I2C buses at the specified address, it will be used as the authoritative source for reading device battery level voltage. Setting is ignored for devices with PMUs (e.g. T-beams) If an INA-2XX device is auto-detected on one of the I2C buses at the specified address, it will be used as the authoritative source for reading device battery level voltage. Setting is ignored for devices with PMUs (e.g. T-beams)
:::tip :::tip[Convert hexadecimal to decimal]
I2C addresses are normally represented in hexadecimal and will require conversion to decimal in order to set via Meshtastic clients. For example the I2C address of 0x40 converted to decimal is 64. I2C addresses are normally represented in hexadecimal and will require conversion to decimal in order to set via Meshtastic clients. For example the I2C address of 0x40 converted to decimal is 64.
::: :::

View file

@ -356,12 +356,12 @@ export const FrequencyCalculator = (): JSX.Element => {
</div> </div>
<div className="flex gap-2 mb-4"> <div className="flex gap-2 mb-4">
<label className="font-semibold">Number of channels:</label> <label className="font-semibold">Number of slots:</label>
<input type="number" disabled={true} value={numChannels} /> <input type="number" disabled={true} value={numChannels} />
</div> </div>
<div className="flex gap-2"> <div className="flex gap-2">
<label>Channel:</label> <label>Frequency Slot:</label>
<select <select
value={channel} value={channel}
onChange={(e) => setChannel(Number.parseInt(e.target.value))} onChange={(e) => setChannel(Number.parseInt(e.target.value))}
@ -375,7 +375,7 @@ export const FrequencyCalculator = (): JSX.Element => {
</div> </div>
<div className="flex gap-2"> <div className="flex gap-2">
<label className="font-semibold">Channel Frequency:</label> <label className="font-semibold">Frequency of slot:</label>
<input type="number" disabled={true} value={channelFrequency} /> <input type="number" disabled={true} value={channelFrequency} />
</div> </div>
</div> </div>