Skip to content
Open
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
16 changes: 8 additions & 8 deletions indigo_drivers/agent_alpaca/alpaca_switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,17 +574,17 @@ long indigo_alpaca_switch_get_command(indigo_alpaca_device *alpaca_device, int v
return snprintf(buffer, buffer_length, "\"Value\": [ ], \"ErrorNumber\": 0, \"ErrorMessage\": \"\"");
}
if (!strcmp(command, "interfaceversion")) {
uint32_t value;
uint32_t value = 0;
indigo_alpaca_error result = alpaca_get_interfaceversion(alpaca_device, version, &value);
return indigo_alpaca_append_value_int(buffer, buffer_length, value, result);
}
if (!strcmp(command, "maxswitch")) {
uint32_t value;
uint32_t value = 0;
indigo_alpaca_error result = alpaca_get_maxswitch(alpaca_device, version, &value);
return indigo_alpaca_append_value_int(buffer, buffer_length, value, result);
}
if (!strcmp(command, "canwrite")) {
bool value;
bool value = false;
indigo_alpaca_error result = alpaca_get_canwrite(alpaca_device, version, id, &value);
return indigo_alpaca_append_value_bool(buffer, buffer_length, value, result);
}
Expand All @@ -594,27 +594,27 @@ long indigo_alpaca_switch_get_command(indigo_alpaca_device *alpaca_device, int v
return indigo_alpaca_append_value_string(buffer, buffer_length, value, result);
}
if (!strcmp(command, "getswitch")) {
bool value;
bool value = false;
indigo_alpaca_error result = alpaca_get_switch(alpaca_device, version, id, &value);
return indigo_alpaca_append_value_bool(buffer, buffer_length, value, result);
}
if (!strcmp(command, "getswitchvalue")) {
double value;
double value = 0.0;
indigo_alpaca_error result = alpaca_get_switchvalue(alpaca_device, version, id, &value);
return indigo_alpaca_append_value_double(buffer, buffer_length, value, result);
}
if (!strcmp(command, "minswitchvalue")) {
double value;
double value = 0.0;
indigo_alpaca_error result = alpaca_get_minswitchvalue(alpaca_device, version, id, &value);
return indigo_alpaca_append_value_double(buffer, buffer_length, value, result);
}
if (!strcmp(command, "maxswitchvalue")) {
double value;
double value = 0.0;
indigo_alpaca_error result = alpaca_get_maxswitchvalue(alpaca_device, version, id, &value);
return indigo_alpaca_append_value_double(buffer, buffer_length, value, result);
}
if (!strcmp(command, "switchstep")) {
double value;
double value = 0.0;
indigo_alpaca_error result = alpaca_get_switchstep(alpaca_device, version, id, &value);
return indigo_alpaca_append_value_double(buffer, buffer_length, value, result);
}
Expand Down
2 changes: 1 addition & 1 deletion indigo_drivers/dome_nexdome/indigo_dome_nexdome.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ static void dome_connect_callback(indigo_device *device) {
indigo_update_property(device, INFO_PROPERTY, NULL);
INDIGO_DRIVER_LOG(DRIVER_NAME, "%s with firmware V.%s connected.", name, firmware);

bool reversed;
bool reversed = false;
if (!nexdome_get_reversed_flag(device, &reversed)) {
INDIGO_DRIVER_ERROR(DRIVER_NAME, "nexdome_get_reversed_flag(): returned error");
}
Expand Down
4 changes: 2 additions & 2 deletions indigo_drivers/focuser_lunatico/shared/lunatico_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -1117,8 +1117,8 @@ static indigo_result lunatico_common_update_property(indigo_device *device, indi
// --------------------------------------------------------------------------------- INDIGO AUX Powerbox device implementation

static void sensors_timer_callback(indigo_device *device) {
int sensor_value;
bool success;
int sensor_value = 0;
bool success = false;

AUX_GPIO_SENSORS_PROPERTY->state = INDIGO_OK_STATE;

Expand Down
7 changes: 4 additions & 3 deletions indigo_drivers/mount_asi/indigo_mount_asi.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,8 @@ static bool asi_guide_ra(indigo_device *device, int west, int east) {
}

static void asi_update_site_items(indigo_device *device) {
double latitude, longitude;
double latitude = 0.0;
double longitude = 0.0;
asi_get_site(device, &latitude, &longitude);
MOUNT_GEOGRAPHIC_COORDINATES_LATITUDE_ITEM->number.target = MOUNT_GEOGRAPHIC_COORDINATES_LATITUDE_ITEM->number.value = latitude;
MOUNT_GEOGRAPHIC_COORDINATES_LONGITUDE_ITEM->number.target = MOUNT_GEOGRAPHIC_COORDINATES_LONGITUDE_ITEM->number.value = longitude;
Expand Down Expand Up @@ -755,7 +756,7 @@ static void position_timer_callback(indigo_device *device) {
indigo_update_property(device, MOUNT_UTC_TIME_PROPERTY, NULL);

if (indigo_get_log_level() >= INDIGO_LOG_DEBUG) {
double st;
double st = 0.0;
asi_get_sidereal_time(device, &st);
INDIGO_DRIVER_DEBUG(DRIVER_NAME, "Mount LST = %lf, Host LST = %lf, offset = %.2fs", st, MOUNT_LST_TIME_ITEM->number.value, fabs(st - MOUNT_LST_TIME_ITEM->number.value)*3600);
}
Expand Down Expand Up @@ -1152,7 +1153,7 @@ static void zwo_meridian_limit_callback(indigo_device *device) {
} else {
ZWO_MERIDIAN_LIMIT_PROPERTY->state = INDIGO_ALERT_STATE;
}
int value;
int value = 0;
asi_get_meridian_settings(device, NULL, NULL, &value);
ZWO_MERIDIAN_LIMIT_ITEM->number.value = value;
indigo_update_property(device, ZWO_MERIDIAN_LIMIT_PROPERTY, NULL);
Expand Down
2 changes: 1 addition & 1 deletion indigo_drivers/rotator_asi/indigo_rotator_asi.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static indigo_result rotator_attach(indigo_device *device) {
}

static void rotator_connect_callback(indigo_device *device) {
int index;
int index = 0;
CONNECTION_PROPERTY->state = INDIGO_OK_STATE;
if (CONNECTION_CONNECTED_ITEM->sw.value) {
index = find_index_by_device_id(PRIVATE_DATA->dev_id);
Expand Down
4 changes: 2 additions & 2 deletions indigo_libs/indigo_driver_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static indigo_result json_define_property(indigo_client *client, indigo_device *
long buffer_size = JSON_BUFFER_SIZE;
char *output_buffer = indigo_safe_malloc(buffer_size);
char *pnt = output_buffer;
long size;
long size = 0l;
char b1[32], b2[32], b3[32], b4[32], b5[32];
switch (property->type) {
case INDIGO_TEXT_VECTOR:
Expand Down Expand Up @@ -224,7 +224,7 @@ static indigo_result json_update_property(indigo_client *client, indigo_device *
long buffer_size = JSON_BUFFER_SIZE;
char *output_buffer = indigo_safe_malloc(buffer_size);
char *pnt = output_buffer;
long size;
long size = 0l;
char b1[32], b2[32];
switch (property->type) {
case INDIGO_TEXT_VECTOR:
Expand Down