Skip to content

Commit

Permalink
check value of radio.begin
Browse files Browse the repository at this point in the history
  • Loading branch information
positron96 committed Oct 3, 2018
1 parent 1d77422 commit e96477e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion RF24Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ RF24Mesh::RF24Mesh( RF24& _radio,RF24Network& _network ): radio(_radio),network(

bool RF24Mesh::begin(uint8_t channel, rf24_datarate_e data_rate, uint32_t timeout){
//delay(1); // Found problems w/SPIDEV & ncurses. Without this, getch() returns a stream of garbage
radio.begin();
if(!radio.begin())
return 0;
radio_channel = channel;
radio.setChannel(radio_channel);
radio.setDataRate(data_rate);
Expand Down

0 comments on commit e96477e

Please sign in to comment.