diff --git a/app/decode-reg.cc b/app/decode-reg.cc index fb06f5b..5ea1c2f 100644 --- a/app/decode-reg.cc +++ b/app/decode-reg.cc @@ -285,9 +285,9 @@ int main(int argc, char *argv[]) auto channel = args.get("-c"); ctl.write_channel("AMP_EN", channel, args.is_used("-e")); - ctl.write_channel("MODE", channel, get_index(args.get("-m"), lamp::mode_list)); - ctl.write_channel("PI_KP", channel, args.get("-k")); - ctl.write_channel("PI_TI", channel, args.get("-t")); + ctl.write_channel("MODE", channel, (int32_t)get_index(args.get("-m"), lamp::mode_list)); + ctl.write_channel("PI_KP", channel, (int32_t)args.get("-k")); + ctl.write_channel("PI_TI", channel, (int32_t)args.get("-t")); ctl.write_channel("PI_SP", channel, args.get("-s")); ctl.write_channel("DAC", channel, args.get("-d")); @@ -295,7 +295,7 @@ int main(int argc, char *argv[]) ctl.write_channel("LIMIT_B", channel, args.get("-L")); ctl.write_channel("CNT", channel, args.get("-C")); - ctl.write_channel("TRIG_EN", channel, args.get("-T")); + ctl.write_channel("TRIG_EN", channel, (int32_t)args.get("-T")); ctl.write_params(); } diff --git a/util/controllers.h b/util/controllers.h index 9888029..e3fc725 100644 --- a/util/controllers.h +++ b/util/controllers.h @@ -51,11 +51,11 @@ class RegisterDecoderController: public RegisterController { virtual void encode_params() override { } - void write_general(const char *name, int32_t value) + void write_general(const char *name, decoders::data_type value) { pdec->write_general(name, value, read_dest); } - void write_channel(const char *name, unsigned pos, int32_t value) + void write_channel(const char *name, unsigned pos, decoders::data_type value) { pdec->write_channel(name, pos, value, read_dest); } diff --git a/util/tests/controllers-test.cc b/util/tests/controllers-test.cc index 7b74073..8586df1 100644 --- a/util/tests/controllers-test.cc +++ b/util/tests/controllers-test.cc @@ -44,7 +44,7 @@ TEST_CASE("RegisterDecoderController write_general", "[controllers-test]") CHECK(dec.get_general_data("RF_INT") == -0x11); } -TEST_CASE("RegisterDecoderController write_general fixed-point", "[controllers-test][!shouldfail]") +TEST_CASE("RegisterDecoderController write_general fixed-point", "[controllers-test]") { TestRegisterDecoderController ctl{}; TestRegisterDecoder dec{};