Skip to content

Commit

Permalink
Modify printDetails to work with ESP8266
Browse files Browse the repository at this point in the history
Note: Requires latest version of ESP8266 Arduino firmware as of 05/19
  • Loading branch information
TMRh20 committed May 12, 2019
1 parent 0fabd62 commit c25d840
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions RF24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,10 @@ void RF24::printDetails(void)
print_byte_register(PSTR("CONFIG\t"),NRF_CONFIG);
print_byte_register(PSTR("DYNPD/FEATURE"),DYNPD,2);

printf_P(PSTR("Data Rate\t = " PRIPSTR "\r\n"),pgm_read_word(&rf24_datarate_e_str_P[getDataRate()]));
printf_P(PSTR("Model\t\t = " PRIPSTR "\r\n"),pgm_read_word(&rf24_model_e_str_P[isPVariant()]));
printf_P(PSTR("CRC Length\t = " PRIPSTR "\r\n"),pgm_read_word(&rf24_crclength_e_str_P[getCRCLength()]));
printf_P(PSTR("PA Power\t = " PRIPSTR "\r\n"), pgm_read_word(&rf24_pa_dbm_e_str_P[getPALevel()]));
printf_P(PSTR("Data Rate\t = " PRIPSTR "\r\n"),pgm_read_ptr(&rf24_datarate_e_str_P[getDataRate()]));
printf_P(PSTR("Model\t\t = " PRIPSTR "\r\n"),pgm_read_ptr(&rf24_model_e_str_P[isPVariant()]));
printf_P(PSTR("CRC Length\t = " PRIPSTR "\r\n"),pgm_read_ptr(&rf24_crclength_e_str_P[getCRCLength()]));
printf_P(PSTR("PA Power\t = " PRIPSTR "\r\n"), pgm_read_ptr(&rf24_pa_dbm_e_str_P[getPALevel()]));

}

Expand Down

5 comments on commit c25d840

@BadamBoum
Copy link

@BadamBoum BadamBoum commented on c25d840 May 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess something is missing in this commit. Compiler gave me an error :
RF24.cpp:579:100: error: ‘pgm_read_ptr’ was not declared in this scope

Target : RPi3 with latest raspbian.

@Avamander
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try updating your ESP8266 core and let us know if the issue remains.

@BadamBoum
Copy link

@BadamBoum BadamBoum commented on c25d840 May 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I just add more data in my previous comment.
I'm on a RPi3, using python3 and latest raspbian. By the way, I already install this lib on Pi2 some weeks ago without any issue.
And previous commit compile just fine (just tested it).

@TMRh20
Copy link
Member Author

@TMRh20 TMRh20 commented on c25d840 May 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this change did break things for the RPI, should be fixed now.

@BadamBoum
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi !
Confirmation that commit 2fa6e8c correct the issue.
Thank you for your time and your work <3

Please sign in to comment.