mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-28 10:42:08 +00:00
fix signedness warnings of NRF52 toolchain
This commit is contained in:
parent
fd9461505f
commit
f47b40cf68
@ -452,7 +452,7 @@ bool GPS::setup()
|
|||||||
// Set the NEMA output messages
|
// Set the NEMA output messages
|
||||||
// Ask for only RMC and GGA
|
// Ask for only RMC and GGA
|
||||||
uint8_t fields[] = {CAS_NEMA_RMC, CAS_NEMA_GGA};
|
uint8_t fields[] = {CAS_NEMA_RMC, CAS_NEMA_GGA};
|
||||||
for (int i = 0; i < sizeof(fields); i++) {
|
for (uint i = 0; i < sizeof(fields); i++) {
|
||||||
// Construct a CAS-CFG-MSG packet
|
// Construct a CAS-CFG-MSG packet
|
||||||
uint8_t cas_cfg_msg_packet[] = {0x4e, fields[i], 0x01, 0x00};
|
uint8_t cas_cfg_msg_packet[] = {0x4e, fields[i], 0x01, 0x00};
|
||||||
msglen = makeCASPacket(0x06, 0x01, sizeof(cas_cfg_msg_packet), cas_cfg_msg_packet);
|
msglen = makeCASPacket(0x06, 0x01, sizeof(cas_cfg_msg_packet), cas_cfg_msg_packet);
|
||||||
@ -1584,7 +1584,7 @@ bool GPS::hasFlow()
|
|||||||
|
|
||||||
bool GPS::whileIdle()
|
bool GPS::whileIdle()
|
||||||
{
|
{
|
||||||
int charsInBuf = 0;
|
uint charsInBuf = 0;
|
||||||
bool isValid = false;
|
bool isValid = false;
|
||||||
if (!isAwake) {
|
if (!isAwake) {
|
||||||
clearBuffer();
|
clearBuffer();
|
||||||
|
@ -492,7 +492,7 @@ void RadioInterface::applyModemConfig()
|
|||||||
// If user has manually specified a channel num, then use that, otherwise generate one by hashing the name
|
// If user has manually specified a channel num, then use that, otherwise generate one by hashing the name
|
||||||
const char *channelName = channels.getName(channels.getPrimaryIndex());
|
const char *channelName = channels.getName(channels.getPrimaryIndex());
|
||||||
// channel_num is actually (channel_num - 1), since modulus (%) returns values from 0 to (numChannels - 1)
|
// channel_num is actually (channel_num - 1), since modulus (%) returns values from 0 to (numChannels - 1)
|
||||||
int channel_num = (loraConfig.channel_num ? loraConfig.channel_num - 1 : hash(channelName)) % numChannels;
|
uint channel_num = (loraConfig.channel_num ? loraConfig.channel_num - 1 : hash(channelName)) % numChannels;
|
||||||
|
|
||||||
// Check if we use the default frequency slot
|
// Check if we use the default frequency slot
|
||||||
RadioInterface::uses_default_frequency_slot =
|
RadioInterface::uses_default_frequency_slot =
|
||||||
|
@ -51,7 +51,7 @@ uint8_t RoutingModule::getHopLimitForResponse(uint8_t hopStart, uint8_t hopLimit
|
|||||||
uint8_t hopsUsed = hopStart < hopLimit ? config.lora.hop_limit : hopStart - hopLimit;
|
uint8_t hopsUsed = hopStart < hopLimit ? config.lora.hop_limit : hopStart - hopLimit;
|
||||||
if (hopsUsed > config.lora.hop_limit) {
|
if (hopsUsed > config.lora.hop_limit) {
|
||||||
return hopsUsed; // If the request used more hops than the limit, use the same amount of hops
|
return hopsUsed; // If the request used more hops than the limit, use the same amount of hops
|
||||||
} else if (hopsUsed + 2 < config.lora.hop_limit) {
|
} else if ((uint8_t)(hopsUsed + 2) < config.lora.hop_limit) {
|
||||||
return hopsUsed + 2; // Use only the amount of hops needed with some margin as the way back may be different
|
return hopsUsed + 2; // Use only the amount of hops needed with some margin as the way back may be different
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user