@@ -619,16 +619,29 @@ void RF24::printPrettyDetails(void) {
619
619
" \r\n " ), (char *)pgm_read_ptr (&rf24_feature_e_str_P[(bool )(features & _BV (EN_ACK_PAY)) * 1 ]));
620
620
621
621
uint8_t dynPl = read_register (DYNPD);
622
- uint8_t autoAck = read_register (EN_AA);
623
622
printf_P (PSTR (" Dynamic Payloads\t "
624
623
PRIPSTR
625
624
" \r\n " ), (char *)pgm_read_ptr (&rf24_feature_e_str_P[(dynPl && (features &_BV (EN_DPL))) * 1 ]));
626
- printf_P (PSTR (" Auto Acknowledgment\t "
627
- PRIPSTR
628
- " \r\n " ), (char *)pgm_read_ptr (&rf24_feature_e_str_P[(bool )(autoAck & 1 ) * 1 ]));
625
+
626
+ uint8_t autoAck = read_register (EN_AA);
627
+ if (autoAck == 0x3F || autoAck == 0 ) {
628
+ // all pipes have the same configuration about auto-ack feature
629
+ printf_P (PSTR (" Auto Acknowledgment\t "
630
+ PRIPSTR
631
+ " \r\n " ), (char *)pgm_read_ptr (&rf24_feature_e_str_P[(bool )(autoAck) * 1 ]));
632
+ } else {
633
+ // representation per pipe
634
+ printf_P (PSTR (" Auto Acknowledgment\t = 0b%c%c%c%c%c%c\r\n " ),
635
+ (char )((bool )(autoAck & _BV (ENAA_P5)) + 48 ),
636
+ (char )((bool )(autoAck & _BV (ENAA_P4)) + 48 ),
637
+ (char )((bool )(autoAck & _BV (ENAA_P3)) + 48 ),
638
+ (char )((bool )(autoAck & _BV (ENAA_P2)) + 48 ),
639
+ (char )((bool )(autoAck & _BV (ENAA_P1)) + 48 ),
640
+ (char )((bool )(autoAck & _BV (ENAA_P0)) + 48 ));
641
+ }
629
642
630
643
config_reg = read_register (NRF_CONFIG);
631
- printf_P (PSTR (" Primary Mode\t\t = %cX\r\n " ), config_reg & _BV (PWR_UP ) ? ' T ' : ' R ' );
644
+ printf_P (PSTR (" Primary Mode\t\t = %cX\r\n " ), config_reg & _BV (PRIM_RX ) ? ' R ' : ' T ' );
632
645
print_address_register (PSTR (" TX address\t " ), TX_ADDR);
633
646
634
647
uint8_t openPipes = read_register (EN_RXADDR);
0 commit comments