summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/radio-controller.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/radio-controller.cpp b/src/radio-controller.cpp
index 2c038ed..e4218cc 100644
--- a/src/radio-controller.cpp
+++ b/src/radio-controller.cpp
@@ -245,7 +245,12 @@ void main_loop()
} else if (result.state == decoding_state::BAD_START) {
printf("Bad start\n");
} else if (result.state == decoding_state::OK) {
- printf("OK: size=%d, value: 0x%08" PRIx32 "%08" PRIx32 "\n", result.data.size(), result.data.u32(1), result.data.u32(0));
+ printf("OK: size=%d, value: 0x%08" PRIx32 "%08" PRIx32 "\n", result.data.size(),
+ result.data.u32(1), result.data.u32(0));
+ uint32_t manufacturer = result.data.extract_bits(0, 12);
+ uint32_t command = result.data.extract_bits(12, 8);
+ printf("Samsung: Manufacturer=%" PRIu32 ", 0x%" PRIx32 ", command=%" PRIu32 ", 0x%" PRIx32 "\n",
+ manufacturer, manufacturer, command, command);
}
ir_buffer.reset();