]> sigrok.org Git - libsigrokdecode.git/commitdiff
nrf905: Drop all print() calls.
authorUwe Hermann <redacted>
Tue, 26 May 2020 19:52:52 +0000 (21:52 +0200)
committerUwe Hermann <redacted>
Tue, 26 May 2020 20:02:23 +0000 (22:02 +0200)
If those are useful for the decoder user, they should be annotations
using the Ann.WARN annotation class.

decoders/nrf905/pd.py

index c36bd10eccdfc5f046a1d8a4e7330edbd20693ca..cc22e930274c0ee0443fe426f78edf7378000004 100644 (file)
@@ -167,8 +167,6 @@ class Decoder(srd.Decoder):
             reg_addr = i + addr
             if reg_addr <= 9:
                 self.parse_config_register(reg_addr, registers[i], is_write)
-            else:
-                print('INVALID REGISTER ADDR ' + hex(reg_addr))
             i += 1
 
     def dump_cmd_bytes(self, prefix, cmd_bytes, ann):
@@ -182,14 +180,12 @@ class Decoder(srd.Decoder):
     def handle_WC(self):
         start_addr = self.mosi_bytes[0][0] & 0x0F
         if start_addr > 9:
-            print('ERROR: WRONG OFFSET')
             return
         self.parse_config_registers(start_addr, self.mosi_bytes[1:], True)
 
     def handle_RC(self):
         start_addr = self.mosi_bytes[0][0] & 0x0F
         if start_addr > 9:
-            print('ERROR: WRONG OFFSET')
             return
         self.parse_config_registers(start_addr, self.miso_bytes[1:], False)