[FSK4] Update to 5.0.0
This commit is contained in:
parent
e82049587b
commit
727e4b4703
4 changed files with 11 additions and 10 deletions
|
@ -68,7 +68,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 "));
|
||||
|
@ -92,7 +92,7 @@ void setup() {
|
|||
// frequency shift: 270 Hz
|
||||
// baud rate: 100 baud
|
||||
state = fsk4.begin(434.0, 270, 100);
|
||||
if(state == ERR_NONE) {
|
||||
if(state == RADIOLIB_ERR_NONE) {
|
||||
Serial.println(F("success!"));
|
||||
} else {
|
||||
Serial.print(F("failed, code "));
|
||||
|
|
|
@ -69,7 +69,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 "));
|
||||
|
@ -85,7 +85,7 @@ void setup() {
|
|||
// frequency shift: 270 Hz
|
||||
// baud rate: 100 baud
|
||||
state = fsk4.begin(400, 270, 100);
|
||||
if(state == ERR_NONE) {
|
||||
if(state == RADIOLIB_ERR_NONE) {
|
||||
Serial.println(F("success!"));
|
||||
} else {
|
||||
Serial.print(F("failed, code "));
|
||||
|
|
|
@ -28,7 +28,7 @@ int16_t FSK4Client::begin(float base, uint32_t shift, uint16_t rate) {
|
|||
|
||||
// check minimum shift value
|
||||
if(shift < step / 2) {
|
||||
return(ERR_INVALID_RTTY_SHIFT);
|
||||
return(RADIOLIB_ERR_INVALID_RTTY_SHIFT);
|
||||
}
|
||||
|
||||
// round shift to multiples of frequency step size
|
||||
|
@ -87,10 +87,11 @@ size_t FSK4Client::write(uint8_t b) {
|
|||
}
|
||||
|
||||
void FSK4Client::tone(uint8_t i) {
|
||||
uint32_t start = Module::micros();
|
||||
Module* mod = _phy->getMod();
|
||||
uint32_t start = mod->micros();
|
||||
transmitDirect(_base + _tones[i], _baseHz + _tonesHz[i]);
|
||||
while(Module::micros() - start < _bitDuration) {
|
||||
Module::yield();
|
||||
while(mod->micros() - start < _bitDuration) {
|
||||
mod->yield();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ class FSK4Client {
|
|||
size_t write(uint8_t b);
|
||||
|
||||
|
||||
#ifndef RADIOLIB_GODMODE
|
||||
#if !defined(RADIOLIB_GODMODE)
|
||||
private:
|
||||
#endif
|
||||
PhysicalLayer* _phy;
|
||||
|
|
Loading…
Add table
Reference in a new issue