mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix typo: LENGHT -> LENGTH
This commit is contained in:
parent
7fa5fcfa1d
commit
9ec7aa7fd7
3 changed files with 7 additions and 7 deletions
|
@ -79,7 +79,7 @@
|
||||||
#define SUUNTO_VYPER_ALARM_DEPTH_TIME 0x65
|
#define SUUNTO_VYPER_ALARM_DEPTH_TIME 0x65
|
||||||
#define SUUNTO_VYPER_ALARM_TIME 0x66
|
#define SUUNTO_VYPER_ALARM_TIME 0x66
|
||||||
#define SUUNTO_VYPER_ALARM_DEPTH 0x68
|
#define SUUNTO_VYPER_ALARM_DEPTH 0x68
|
||||||
#define SUUNTO_VYPER_CUSTOM_TEXT_LENGHT 30
|
#define SUUNTO_VYPER_CUSTOM_TEXT_LENGTH 30
|
||||||
|
|
||||||
#ifdef DEBUG_OSTC
|
#ifdef DEBUG_OSTC
|
||||||
// Fake io to ostc memory banks
|
// Fake io to ostc memory banks
|
||||||
|
@ -148,7 +148,7 @@ static void write_ostc_cf(unsigned char data[], unsigned char cf, unsigned char
|
||||||
|
|
||||||
static dc_status_t read_suunto_vyper_settings(dc_device_t *device, DeviceDetails *m_deviceDetails, dc_event_callback_t progress_cb, void *userdata)
|
static dc_status_t read_suunto_vyper_settings(dc_device_t *device, DeviceDetails *m_deviceDetails, dc_event_callback_t progress_cb, void *userdata)
|
||||||
{
|
{
|
||||||
unsigned char data[SUUNTO_VYPER_CUSTOM_TEXT_LENGHT + 1];
|
unsigned char data[SUUNTO_VYPER_CUSTOM_TEXT_LENGTH + 1];
|
||||||
dc_status_t rc;
|
dc_status_t rc;
|
||||||
dc_event_progress_t progress;
|
dc_event_progress_t progress;
|
||||||
progress.current = 0;
|
progress.current = 0;
|
||||||
|
@ -204,10 +204,10 @@ static dc_status_t read_suunto_vyper_settings(dc_device_t *device, DeviceDetails
|
||||||
m_deviceDetails->serialNo = QString::number(serial_number);
|
m_deviceDetails->serialNo = QString::number(serial_number);
|
||||||
EMIT_PROGRESS();
|
EMIT_PROGRESS();
|
||||||
|
|
||||||
rc = dc_device_read(device, SUUNTO_VYPER_CUSTOM_TEXT, data, SUUNTO_VYPER_CUSTOM_TEXT_LENGHT);
|
rc = dc_device_read(device, SUUNTO_VYPER_CUSTOM_TEXT, data, SUUNTO_VYPER_CUSTOM_TEXT_LENGTH);
|
||||||
if (rc != DC_STATUS_SUCCESS)
|
if (rc != DC_STATUS_SUCCESS)
|
||||||
return rc;
|
return rc;
|
||||||
data[SUUNTO_VYPER_CUSTOM_TEXT_LENGHT] = 0;
|
data[SUUNTO_VYPER_CUSTOM_TEXT_LENGTH] = 0;
|
||||||
m_deviceDetails->customText = (const char *)data;
|
m_deviceDetails->customText = (const char *)data;
|
||||||
EMIT_PROGRESS();
|
EMIT_PROGRESS();
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ static dc_status_t write_suunto_vyper_settings(dc_device_t *device, DeviceDetail
|
||||||
rc = dc_device_write(device, SUUNTO_VYPER_CUSTOM_TEXT,
|
rc = dc_device_write(device, SUUNTO_VYPER_CUSTOM_TEXT,
|
||||||
// Convert the customText to a 30 char wide padded with " "
|
// Convert the customText to a 30 char wide padded with " "
|
||||||
(const unsigned char *)QString("%1").arg(m_deviceDetails->customText, -30, QChar(' ')).toUtf8().data(),
|
(const unsigned char *)QString("%1").arg(m_deviceDetails->customText, -30, QChar(' ')).toUtf8().data(),
|
||||||
SUUNTO_VYPER_CUSTOM_TEXT_LENGHT);
|
SUUNTO_VYPER_CUSTOM_TEXT_LENGTH);
|
||||||
if (rc != DC_STATUS_SUCCESS)
|
if (rc != DC_STATUS_SUCCESS)
|
||||||
return rc;
|
return rc;
|
||||||
EMIT_PROGRESS();
|
EMIT_PROGRESS();
|
||||||
|
|
|
@ -1625,7 +1625,7 @@ void UnitsSettings::setLength(int value)
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(group);
|
s.beginGroup(group);
|
||||||
s.setValue("length", value);
|
s.setValue("length", value);
|
||||||
prefs.units.length = (units::LENGHT) value;
|
prefs.units.length = (units::LENGTH) value;
|
||||||
emit lengthChanged(value);
|
emit lengthChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ static inline int mbar_to_PSI(int mbar)
|
||||||
#undef PASCAL
|
#undef PASCAL
|
||||||
#endif
|
#endif
|
||||||
struct units {
|
struct units {
|
||||||
enum LENGHT {
|
enum LENGTH {
|
||||||
METERS,
|
METERS,
|
||||||
FEET
|
FEET
|
||||||
} length;
|
} length;
|
||||||
|
|
Loading…
Add table
Reference in a new issue