From e758988579c3bf058214bf6e4ae56cf27b52bcfb Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 4 Jun 2017 19:25:41 +0200 Subject: o Decoding manufacturer and command too. --- src/radio-controller.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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(); -- cgit v1.2.3