We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d35834b commit 9f04391Copy full SHA for 9f04391
1 file changed
src/platform/portduino/PortduinoGlue.cpp
@@ -547,8 +547,7 @@ bool loadConfig(const char *configPath)
547
if (yamlConfig["Lora"]["TX_GAIN_LORA"]) {
548
YAML::Node tx_gain_node = yamlConfig["Lora"]["TX_GAIN_LORA"];
549
if (tx_gain_node.IsSequence() && tx_gain_node.size() != 0) {
550
- portduino_config.num_pa_points =
551
- min(tx_gain_node.size(), sizeof(portduino_config.tx_gain_lora) / sizeof(uint16_t));
+ portduino_config.num_pa_points = min(tx_gain_node.size(), std::size(portduino_config.tx_gain_lora));
552
for (int i = 0; i < portduino_config.num_pa_points; i++) {
553
portduino_config.tx_gain_lora[i] = tx_gain_node[i].as<int>();
554
}
0 commit comments