kopia lustrzana https://github.com/projecthorus/horusbinary_radiolib
Anpassungen / Bugfix
rodzic
c57e6c5017
commit
25a59bbc91
|
@ -55,11 +55,11 @@ int16_t fsk4_transmitDirect(PhysicalLayer* phy, uint32_t freq) {
|
|||
}
|
||||
|
||||
void fsk4_tone(PhysicalLayer* phy, uint8_t i) {
|
||||
uint32_t start = Module::micros();
|
||||
uint32_t start = micros();
|
||||
fsk4_transmitDirect(phy, fsk4_base + fsk4_tones[i]);
|
||||
//delayMicroseconds(fsk4_bitDuration);
|
||||
while(Module::micros() - start < fsk4_bitDuration) {
|
||||
Module::yield();
|
||||
while(micros() - start < fsk4_bitDuration) {
|
||||
yield();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ size_t fsk4_writebyte(PhysicalLayer* phy, uint8_t b){
|
|||
return(1);
|
||||
}
|
||||
|
||||
void fsk4_write(PhysicalLayer* phy, uint8_t* buff, size_t len){
|
||||
size_t fsk4_write(PhysicalLayer* phy, char* buff, size_t len){
|
||||
size_t n = 0;
|
||||
for(size_t i = 0; i < len; i++) {
|
||||
n += fsk4_writebyte(phy, buff[i]);
|
||||
|
|
|
@ -163,7 +163,7 @@ void setup() {
|
|||
// (RF69, CC1101, Si4432 etc.), use the basic begin() method
|
||||
// int state = radio.begin();
|
||||
|
||||
if(state == ERR_NONE) {
|
||||
if(state == RADIOLIB_ERR_NONE) {
|
||||
Serial.println(F("success!"));
|
||||
} else {
|
||||
Serial.print(F("failed, code "));
|
||||
|
@ -189,7 +189,7 @@ void setup() {
|
|||
|
||||
state = fsk4_setup(&radio, TX_FREQ, FSK4_SPACING, FSK4_BAUD);
|
||||
|
||||
if(state == ERR_NONE) {
|
||||
if(state == RADIOLIB_ERR_NONE) {
|
||||
Serial.println(F("success!"));
|
||||
} else {
|
||||
Serial.print(F("failed, code "));
|
||||
|
|
Ładowanie…
Reference in New Issue