mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Another whitespace update
grmbl. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e503b5c707
commit
db0c1b834a
1 changed files with 76 additions and 76 deletions
|
@ -130,7 +130,7 @@ static dc_status_t read_suunto_vyper_settings(dc_device_t *device, DeviceDetails
|
||||||
const char *model;
|
const char *model;
|
||||||
// FIXME: grab this info from libdivecomputer descriptor
|
// FIXME: grab this info from libdivecomputer descriptor
|
||||||
// instead of hard coded here
|
// instead of hard coded here
|
||||||
switch(data[0]) {
|
switch (data[0]) {
|
||||||
case 0x03:
|
case 0x03:
|
||||||
model = "Stinger";
|
model = "Stinger";
|
||||||
break;
|
break;
|
||||||
|
@ -531,7 +531,7 @@ static dc_status_t read_ostc3_settings(dc_device_t *device, DeviceDetails *m_dev
|
||||||
|
|
||||||
//read firmware settings
|
//read firmware settings
|
||||||
unsigned char fData[64] = { 0 };
|
unsigned char fData[64] = { 0 };
|
||||||
rc = hw_ostc3_device_version(device, fData, sizeof (fData));
|
rc = hw_ostc3_device_version(device, fData, sizeof(fData));
|
||||||
if (rc != DC_STATUS_SUCCESS)
|
if (rc != DC_STATUS_SUCCESS)
|
||||||
return rc;
|
return rc;
|
||||||
int serial = fData[0] + (fData[1] << 8);
|
int serial = fData[0] + (fData[1] << 8);
|
||||||
|
@ -711,7 +711,7 @@ static dc_status_t write_ostc3_settings(dc_device_t *device, DeviceDetails *m_de
|
||||||
if (rc != DC_STATUS_SUCCESS)
|
if (rc != DC_STATUS_SUCCESS)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
unsigned char data[1] = {0};
|
unsigned char data[1] = { 0 };
|
||||||
#define WRITE_SETTING(_OSTC3_SETTING, _DEVICE_DETAIL) \
|
#define WRITE_SETTING(_OSTC3_SETTING, _DEVICE_DETAIL) \
|
||||||
do { \
|
do { \
|
||||||
data[0] = m_deviceDetails->_DEVICE_DETAIL(); \
|
data[0] = m_deviceDetails->_DEVICE_DETAIL(); \
|
||||||
|
@ -750,7 +750,7 @@ static dc_status_t write_ostc3_settings(dc_device_t *device, DeviceDetails *m_de
|
||||||
#undef WRITE_SETTING
|
#undef WRITE_SETTING
|
||||||
|
|
||||||
// OSTC3 stores the pressureSensorOffset in two-complement
|
// OSTC3 stores the pressureSensorOffset in two-complement
|
||||||
data[0] = (unsigned char) m_deviceDetails->pressureSensorOffset();
|
data[0] = (unsigned char)m_deviceDetails->pressureSensorOffset();
|
||||||
rc = hw_ostc3_device_config_write(device, OSTC3_PRESSURE_SENSOR_OFFSET, data, sizeof(data));
|
rc = hw_ostc3_device_config_write(device, OSTC3_PRESSURE_SENSOR_OFFSET, data, sizeof(data));
|
||||||
if (rc != DC_STATUS_SUCCESS)
|
if (rc != DC_STATUS_SUCCESS)
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -826,7 +826,7 @@ static dc_status_t read_ostc_settings(dc_device_t *device, DeviceDetails *m_devi
|
||||||
gas4.depth = data[31];
|
gas4.depth = data[31];
|
||||||
gas5.depth = data[32];
|
gas5.depth = data[32];
|
||||||
// 33 which gas is Fist gas
|
// 33 which gas is Fist gas
|
||||||
switch(data[33]) {
|
switch (data[33]) {
|
||||||
case 1:
|
case 1:
|
||||||
gas1.type = 2;
|
gas1.type = 2;
|
||||||
break;
|
break;
|
||||||
|
@ -927,8 +927,8 @@ static dc_status_t read_ostc_settings(dc_device_t *device, DeviceDetails *m_devi
|
||||||
// =1: DD/MM/YY
|
// =1: DD/MM/YY
|
||||||
// =2: YY/MM/DD
|
// =2: YY/MM/DD
|
||||||
m_deviceDetails->setDateFormat(data[91]);
|
m_deviceDetails->setDateFormat(data[91]);
|
||||||
// Byte93:
|
// Byte93:
|
||||||
// Total number of CF used in installed firmware
|
// Total number of CF used in installed firmware
|
||||||
#ifdef DEBUG_OSTC_CF
|
#ifdef DEBUG_OSTC_CF
|
||||||
max_CF = data[92];
|
max_CF = data[92];
|
||||||
#endif
|
#endif
|
||||||
|
@ -973,7 +973,7 @@ static dc_status_t read_ostc_settings(dc_device_t *device, DeviceDetails *m_devi
|
||||||
dil5.helium = data[114];
|
dil5.helium = data[114];
|
||||||
// Byte116:
|
// Byte116:
|
||||||
// First Diluent (1-5)
|
// First Diluent (1-5)
|
||||||
switch(data[115]) {
|
switch (data[115]) {
|
||||||
case 1:
|
case 1:
|
||||||
dil1.type = 2;
|
dil1.type = 2;
|
||||||
break;
|
break;
|
||||||
|
@ -1478,7 +1478,7 @@ void WriteSettingsThread::run()
|
||||||
emit error(tr("Failed!"));
|
emit error(tr("Failed!"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#if DC_VERSION_CHECK(0,5,0)
|
#if DC_VERSION_CHECK(0, 5, 0)
|
||||||
case DC_FAMILY_HW_OSTC3:
|
case DC_FAMILY_HW_OSTC3:
|
||||||
supported = true;
|
supported = true;
|
||||||
rc = write_ostc3_settings(m_data->device, m_deviceDetails);
|
rc = write_ostc3_settings(m_data->device, m_deviceDetails);
|
||||||
|
|
Loading…
Reference in a new issue