Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spell check all Code #5228

Merged
merged 8 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/GpioLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ GpioBinaryTransformer::GpioBinaryTransformer(GpioVirtPin *inPin1, GpioVirtPin *i
assert(!inPin2->dependentPin); // We only allow one dependent pin
inPin2->dependentPin = this;

// Don't update at construction time, because various GpioPins might be global constructor based not yet initied because
// Don't update at construction time, because various GpioPins might be global constructor based not yet initiated because
// order of operations for global constructors is not defined.
// update();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ void Power::readPowerStatus()
batteryChargePercent = batteryLevel->getBatteryPercent();
} else {
// If the AXP192 returns a percentage less than 0, the feature is either not supported or there is an error
// In that case, we compute an estimate of the charge percent based on open circuite voltage table defined
// In that case, we compute an estimate of the charge percent based on open circuit voltage table defined
// in power.h
batteryChargePercent = clamp((int)(((batteryVoltageMv - (OCV[NUM_OCV_POINTS - 1] * NUM_CELLS)) * 1e2) /
((OCV[0] * NUM_CELLS) - (OCV[NUM_OCV_POINTS - 1] * NUM_CELLS))),
Expand Down
6 changes: 3 additions & 3 deletions src/PowerFSM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static void powerEnter()
{
// LOG_DEBUG("Enter state: POWER");
if (!isPowered()) {
// If we got here, we are in the wrong state - we should be in powered, let that state ahndle things
// If we got here, we are in the wrong state - we should be in powered, let that state handle things
LOG_INFO("Loss of power in Powered");
powerFSM.trigger(EVENT_POWER_DISCONNECTED);
} else {
Expand Down Expand Up @@ -230,7 +230,7 @@ static void onEnter()
static void onIdle()
{
if (isPowered()) {
// If we got here, we are in the wrong state - we should be in powered, let that state ahndle things
// If we got here, we are in the wrong state - we should be in powered, let that state handle things
powerFSM.trigger(EVENT_POWER_CONNECTED);
}
}
Expand Down Expand Up @@ -371,7 +371,7 @@ void PowerFSM_setup()
// We never enter light-sleep or NB states on NRF52 (because the CPU uses so little power normally)
#ifdef ARCH_ESP32
// See: https://github.com/meshtastic/firmware/issues/1071
// Don't add power saving transitions if we are a power saving tracker or sensor. Sleep will be initiatiated through the
// Don't add power saving transitions if we are a power saving tracker or sensor. Sleep will be initiated through the
// modules
if ((isRouter || config.power.is_power_saving) && !isTrackerOrSensor) {
powerFSM.add_timed_transition(&stateNB, &stateLS,
Expand Down
6 changes: 3 additions & 3 deletions src/gps/GPSUpdateScheduling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ uint32_t GPSUpdateScheduling::msUntilNextSearch()
}

// How long have we already been searching?
// Used to abort a search in progress, if it runs unnaceptably long
// Used to abort a search in progress, if it runs unacceptably long
uint32_t GPSUpdateScheduling::elapsedSearchMs()
{
// If searching
Expand Down Expand Up @@ -98,15 +98,15 @@ void GPSUpdateScheduling::updateLockTimePrediction()

// Ignore the first lock-time: likely to be long, will skew data

// Second locktime: likely stable. Use to intialize the smoothing filter
// Second locktime: likely stable. Use to initialize the smoothing filter
if (searchCount == 1)
predictedMsToGetLock = lockTime;

// Third locktime and after: predict using exponential smoothing. Respond slowly to changes
else if (searchCount > 1)
predictedMsToGetLock = (lockTime * weighting) + (predictedMsToGetLock * (1 - weighting));

searchCount++; // Only tracked so we can diregard initial lock-times
searchCount++; // Only tracked so we can disregard initial lock-times

LOG_DEBUG("Predicting %us to get next lock", predictedMsToGetLock / 1000);
}
Expand Down
2 changes: 1 addition & 1 deletion src/gps/ubx.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ the PM config. Lets try without it.
PMREQ sort of works with SBAS, but the awake time is too short to re-acquire any SBAS sats.
The defination of "Got Fix" doesn't seem to include SBAS. Much more too this...
Even if it was, it can take minutes (up to 12.5),
even under good sat visability conditions to re-acquire the SBAS data.
even under good sat visibility conditions to re-acquire the SBAS data.
Another effect fo the quick transition to sleep is that no other sats will be acquired so the
sat count will tend to remain at what the initial fix was.
Expand Down
2 changes: 1 addition & 1 deletion src/mesh/Channels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ bool Channels::decryptForHash(ChannelIndex chIndex, ChannelHash channelHash)
*
* This method is called before encoding outbound packets
*
* @eturn the (0 to 255) hash for that channel - if no suitable channel could be found, return -1
* @return the (0 to 255) hash for that channel - if no suitable channel could be found, return -1
*/
int16_t Channels::setActiveByIndex(ChannelIndex channelIndex)
{
Expand Down
2 changes: 1 addition & 1 deletion src/mesh/RadioInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const RegionInfo regions[] = {
Philippines
433 - 434.7 MHz <10 mW erp, NTC approved device required
868 - 869.4 MHz <25 mW erp, NTC approved device required
915 - 918 MHz <250 mW EIRP, no external antennna allowed
915 - 918 MHz <250 mW EIRP, no external antenna allowed
https://github.com/meshtastic/firmware/issues/4948#issuecomment-2394926135
*/

Expand Down
2 changes: 1 addition & 1 deletion src/mesh/RadioLibInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ void RadioLibInterface::handleTransmitInterrupt()
// ignore the transmit interrupt
if (sendingPacket)
completeSending();
powerMon->clearState(meshtastic_PowerMon_State_Lora_TXOn); // But our transmitter is deffinitely off now
powerMon->clearState(meshtastic_PowerMon_State_Lora_TXOn); // But our transmitter is definitely off now
}

void RadioLibInterface::completeSending()
Expand Down
2 changes: 1 addition & 1 deletion src/mesh/ReliableRouter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ int32_t ReliableRouter::doRetransmissions()

bool stillValid = true; // assume we'll keep this record around

// FIXME, handle 51 day rolloever here!!!
// FIXME, handle 51 day rollover here!!!
if (p.nextTxMsec <= now) {
if (p.numRetransmissions == 0) {
LOG_DEBUG("Reliable send failed, returning a nak for fr=0x%x,to=0x%x,id=0x%x", p.packet->from, p.packet->to,
Expand Down
2 changes: 1 addition & 1 deletion src/mesh/ReliableRouter.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <unordered_map>

/**
* An identifier for a globalally unique message - a pair of the sending nodenum and the packet id assigned
* An identifier for a globally unique message - a pair of the sending nodenum and the packet id assigned
* to that message
*/
struct GlobalPacketId {
Expand Down
2 changes: 1 addition & 1 deletion src/mesh/Router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ bool perhapsDecode(meshtastic_MeshPacket *p)
}
}

/** Return 0 for success or a Routing_Errror code for failure
/** Return 0 for success or a Routing_Error code for failure
*/
meshtastic_Routing_Error perhapsEncode(meshtastic_MeshPacket *p)
{
Expand Down
4 changes: 2 additions & 2 deletions src/mesh/Router.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class Router : protected concurrency::OSThread
*/
void handleReceived(meshtastic_MeshPacket *p, RxSource src = RX_SRC_RADIO);

/** Frees the provided packet, and generates a NAK indicating the speicifed error while sending */
/** Frees the provided packet, and generates a NAK indicating the specifed error while sending */
void abortSendAndNak(meshtastic_Routing_Error err, meshtastic_MeshPacket *p);
};

Expand All @@ -143,7 +143,7 @@ class Router : protected concurrency::OSThread
*/
bool perhapsDecode(meshtastic_MeshPacket *p);

/** Return 0 for success or a Routing_Errror code for failure
/** Return 0 for success or a Routing_Error code for failure
*/
meshtastic_Routing_Error perhapsEncode(meshtastic_MeshPacket *p);

Expand Down
2 changes: 1 addition & 1 deletion src/mesh/SX126xInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ template <typename T> bool SX126xInterface<T>::init()

// Overriding current limit
// (https://github.com/jgromes/RadioLib/blob/690a050ebb46e6097c5d00c371e961c1caa3b52e/src/modules/SX126x/SX126x.cpp#L85) using
// value in SX126xInterface.h (currently 140 mA) It may or may not be neccessary, depending on how RadioLib functions, from
// value in SX126xInterface.h (currently 140 mA) It may or may not be necessary, depending on how RadioLib functions, from
// SX1261/2 datasheet: OCP after setting DeviceSel with SetPaConfig(): SX1261 - 60 mA, SX1262 - 140 mA For the SX1268 the IC
// defaults to 140mA no matter the set power level, but RadioLib set it lower, this would need further checking Default values
// are: SX1262, SX1268: 0x38 (140 mA), SX1261: 0x18 (60 mA)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/NeighborInfoModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ int32_t NeighborInfoModule::runOnce()
}

/*
Collect a recieved neighbor info packet from another node
Collect a received neighbor info packet from another node
Pass it to an upper client; do not persist this data on the mesh
*/
bool NeighborInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_NeighborInfo *np)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/RoutingModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ RoutingModule::RoutingModule() : ProtobufModule("routing", meshtastic_PortNum_RO
{
isPromiscuous = true;

// moved the ReboradcastMode logic into handleReceivedProtobuf
// moved the RebroadcastMode logic into handleReceivedProtobuf
// LocalOnly requires either the from or to to be a known node
// knownOnly specifically requires the from to be a known node.
encryptedOk = true;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/SerialModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ void SerialModule::processWXSerial()
batVoltageF, capVoltageF, temperatureF);
}
if (gotwind && !Throttle::isWithinTimespanMs(lastAveraged, averageIntervalMillis)) {
// calulate averages and send to the mesh
// calculate averages and send to the mesh
float velAvg = 1.0 * velSum / velCount;

double avgSin = dir_sum_sin / dirCount;
Expand Down
4 changes: 2 additions & 2 deletions src/modules/Telemetry/UnitConversions.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "UnitConversions.h"

float UnitConversions::CelsiusToFahrenheit(float celcius)
float UnitConversions::CelsiusToFahrenheit(float celsius)
{
return (celcius * 9) / 5 + 32;
return (celsius * 9) / 5 + 32;
}

float UnitConversions::MetersPerSecondToKnots(float metersPerSecond)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Telemetry/UnitConversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class UnitConversions
{
public:
static float CelsiusToFahrenheit(float celcius);
static float CelsiusToFahrenheit(float celsius);
static float MetersPerSecondToKnots(float metersPerSecond);
static float MetersPerSecondToMilesPerHour(float metersPerSecond);
static float HectoPascalToInchesOfMercury(float hectoPascal);
Expand Down
2 changes: 1 addition & 1 deletion src/motion/LSM6DS3Sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bool LSM6DS3Sensor::init()
// Default threshold of 2G, less sensitive options are 4, 8 or 16G
sensor.setAccelRange(LSM6DS_ACCEL_RANGE_2_G);

// Duration is number of occurances needed to trigger, higher threshold is less sensitive
// Duration is number of occurrences needed to trigger, higher threshold is less sensitive
sensor.enableWakeup(config.display.wake_on_tap_or_motion, 1, LSM6DS3_WAKE_THRESH);

LOG_DEBUG("LSM6DS3Sensor::init ok");
Expand Down
4 changes: 2 additions & 2 deletions src/sleep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false)
// No need to turn this off if the power draw in sleep mode really is just 0.2uA and turning it off would
// leave floating input for the IRQ line
// If we want to leave the radio receiving in would be 11.5mA current draw, but most of the time it is just waiting
// in its sequencer (true?) so the average power draw should be much lower even if we were listinging for packets
// in its sequencer (true?) so the average power draw should be much lower even if we were listening for packets
// all the time.
PMU->setChargingLedMode(XPOWERS_CHG_LED_OFF);

Expand Down Expand Up @@ -359,7 +359,7 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r
// never tries to go to sleep if the user is using the API
// gpio_wakeup_enable((gpio_num_t)SERIAL0_RX_GPIO, GPIO_INTR_LOW_LEVEL);

// doesn't help - I think the USB-UART chip losing power is pulling the signal llow
// doesn't help - I think the USB-UART chip losing power is pulling the signal low
// gpio_pullup_en((gpio_num_t)SERIAL0_RX_GPIO);

// alas - can only work if using the refclock, which is limited to about 9600 bps
Expand Down