Skip to content

Commit

Permalink
Merge pull request #30 from uniba-swt/29-incorrect-signals-dcc-parame…
Browse files Browse the repository at this point in the history
…ter-calculation

Fix signal dcc param calculation
  • Loading branch information
eyip002 authored Aug 8, 2023
2 parents c192a65 + 55e88e2 commit 572f5a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/highlevel/bidib_highlevel_setter.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ int bidib_set_signal(const char *signal, const char *aspect) {
aspect_port_value = &g_array_index(aspect_mapping->port_values,
t_bidib_dcc_aspect_port_value, k);
params.data = (uint8_t) (aspect_port_value->port & 0x1F);
params.data = params.data | (uint8_t) (aspect_port_value->value | (1 << 5));
params.data = params.data | (uint8_t) (aspect_port_value->value << 5);
params.data = params.data | (dcc_mapping->extended_accessory << 7);
bidib_send_cs_accessory_intern(tmp_addr, params, action_id);
}
Expand Down

0 comments on commit 572f5a2

Please sign in to comment.