mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 01:11:10 +03:00
spelling: correct many misspellings of celsius
Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
@ -32,7 +32,7 @@
|
||||
using namespace upm;
|
||||
using namespace std;
|
||||
|
||||
// conversion from fahrenheit to celcius and back
|
||||
// conversion from fahrenheit to celsius and back
|
||||
|
||||
static float f2c(float f)
|
||||
{
|
||||
@ -107,9 +107,9 @@ HWXPXX::HWXPXX(std::string device, int address, int baud, int bits, char parity,
|
||||
|
||||
// temp scale
|
||||
if (coils[0])
|
||||
m_isCelcius = false;
|
||||
m_isCelsius = false;
|
||||
else
|
||||
m_isCelcius = true;
|
||||
m_isCelsius = true;
|
||||
|
||||
// current override switch status
|
||||
m_override = ((coils[1]) ? true : false);
|
||||
@ -243,7 +243,7 @@ void HWXPXX::update()
|
||||
// temperature, we always store as C
|
||||
float tmpF = float((int16_t)data[1]) / 10.0;
|
||||
|
||||
if (m_isCelcius)
|
||||
if (m_isCelsius)
|
||||
m_temperature = tmpF;
|
||||
else
|
||||
m_temperature = f2c(tmpF);
|
||||
@ -319,11 +319,11 @@ void HWXPXX::setTemperatureScale(bool fahrenheit)
|
||||
{
|
||||
writeCoil(COIL_TEMP_SCALE, fahrenheit);
|
||||
|
||||
// now re-read and set m_isCelcius properly
|
||||
// now re-read and set m_isCelsius properly
|
||||
if (readCoil(COIL_TEMP_SCALE))
|
||||
m_isCelcius = false;
|
||||
m_isCelsius = false;
|
||||
else
|
||||
m_isCelcius = true;
|
||||
m_isCelsius = true;
|
||||
}
|
||||
|
||||
string HWXPXX::getSlaveID()
|
||||
@ -361,11 +361,11 @@ void HWXPXX::setSlaveAddress(int addr)
|
||||
": modbus_set_slave() failed");
|
||||
}
|
||||
|
||||
// now re-read and set m_isCelcius properly
|
||||
// now re-read and set m_isCelsius properly
|
||||
if (readCoil(COIL_TEMP_SCALE))
|
||||
m_isCelcius = false;
|
||||
m_isCelsius = false;
|
||||
else
|
||||
m_isCelcius = true;
|
||||
m_isCelsius = true;
|
||||
}
|
||||
|
||||
void HWXPXX::setDebug(bool enable)
|
||||
|
@ -124,9 +124,9 @@ namespace upm {
|
||||
* the scale the device is operating in natively.
|
||||
*
|
||||
* @param fahrenheit true to return the temperature in degrees
|
||||
* fahrenheit, false to return the temperature in degrees celcius.
|
||||
* The default is false (degrees Celcius).
|
||||
* @return The last temperature reading in Celcius or Fahrenheit
|
||||
* fahrenheit, false to return the temperature in degrees celsius.
|
||||
* The default is false (degrees Celsius).
|
||||
* @return The last temperature reading in Celsius or Fahrenheit
|
||||
*/
|
||||
float getTemperature(bool fahrenheit=false);
|
||||
|
||||
@ -173,7 +173,7 @@ namespace upm {
|
||||
/**
|
||||
* Return the current temperature offset stored on the device.
|
||||
* This is a value between -50 and +50, specified in tenths of a
|
||||
* degree in whatever scale (Celcius or Fahrenheit) is in use.
|
||||
* degree in whatever scale (Celsius or Fahrenheit) is in use.
|
||||
* This offset is applied to the returned temperature reading by the
|
||||
* device.
|
||||
*
|
||||
@ -194,7 +194,7 @@ namespace upm {
|
||||
/**
|
||||
* Set the stored temperature offset on the device. This is a
|
||||
* value between -50 and +50, specified in tenths of a degree in
|
||||
* what ever scale (Celcius or Fahrenheit) is in use. This offset
|
||||
* what ever scale (Celsius or Fahrenheit) is in use. This offset
|
||||
* is applied to the returned temperature reading by the device.
|
||||
*
|
||||
* @param offset Offset in tenths of a degree with a range of -50 to +50
|
||||
@ -216,10 +216,10 @@ namespace upm {
|
||||
* detects this setting automatically and adjusts itself
|
||||
* accordingly, so this is generally never needed. It is used to
|
||||
* set the native reporting scale of the temperature either in
|
||||
* degrees Celcius or Fahrenheit. Its setting will not affect
|
||||
* degrees Celsius or Fahrenheit. Its setting will not affect
|
||||
* the operation of getTemperature().
|
||||
*
|
||||
* @param fahrenheit true to set Fahrenheit, false to set Celcius
|
||||
* @param fahrenheit true to set Fahrenheit, false to set Celsius
|
||||
*/
|
||||
void setTemperatureScale(bool fahrenheit);
|
||||
|
||||
@ -269,7 +269,7 @@ namespace upm {
|
||||
modbus_t *m_mbContext;
|
||||
|
||||
// is the device reporting in C or F?
|
||||
bool m_isCelcius;
|
||||
bool m_isCelsius;
|
||||
|
||||
private:
|
||||
bool m_debugging;
|
||||
|
Reference in New Issue
Block a user