Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pu2clr committed Sep 12, 2024
1 parent a9c214a commit c207d43
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ void readAllTransmitterInformation() {

// Enable or disable PWM duty cycle
void enablePWM(uint8_t value) {
pinMode(PWM_PA, OUTPUT);
if ( value == 0) {
analogWrite(PWM_PA, value);
return;
Expand All @@ -503,9 +504,7 @@ void enablePWM(uint8_t value) {
}
// Switches the the current frequency to a new frequency
void switchTxFrequency(uint16_t freq) {
// enablePWM(0); // PWM duty cycle disabled
tx.setTX(txFrequency = freq);
// enablePWM(pwmPowerDuty); // PWM duty cycle anable
showFrequency();
}
// Shows the first message after turn the transmitter on
Expand Down Expand Up @@ -662,6 +661,7 @@ void doPower() {
else
pwmPowerDuty = 255;
}
pinMode(PWM_PA, OUTPUT);
analogWrite(PWM_PA, pwmPowerDuty);
showPower();
key = browseParameter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ void readAllTransmitterInformation() {

// Enable or disable PWM duty cycle
void enablePWM(uint8_t value) {
pinMode(PWM_PA, OUTPUT);
if (value == 0) {
analogWrite(PWM_PA, value);
return;
Expand Down Expand Up @@ -645,6 +646,7 @@ void doPower() {
else
pwmPowerDuty = 255;
}
pinMode(PWM_PA, OUTPUT);
analogWrite(PWM_PA, pwmPowerDuty);
showPower();
key = browseParameter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ void readAllTransmitterInformation() {

// Enable or disable PWM duty cycle
void enablePWM(uint8_t value) {
pinMode(PWM_PA, OUTPUT);
if ( value == 0) {
analogWrite(PWM_PA, value);
return;
Expand Down Expand Up @@ -684,6 +685,7 @@ void doPower() {
else
pwmPowerDuty = 255;
}
pinMode(PWM_PA, OUTPUT);
analogWrite(PWM_PA, pwmPowerDuty);
showPower();
key = browseParameter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
#define LCD_E 13

// Enconder PINs
#define BT_MENU 14
#define BT_MENU 8

#define PWM_PA 9

Expand Down Expand Up @@ -472,6 +472,7 @@ void readAllTransmitterInformation() {

// Enable or disable PWM duty cycle
void enablePWM(uint8_t value) {
pinMode(PWM_PA, OUTPUT);
if (value == 0) {
analogWrite(PWM_PA, value);
return;
Expand All @@ -484,9 +485,7 @@ void enablePWM(uint8_t value) {

// Switches the the current frequency to a new frequency
void switchTxFrequency(uint16_t freq) {
// enablePWM(0); // PWM duty cycle disabled
tx.setTX(txFrequency = freq);
// enablePWM(pwmPowerDuty); // PWM duty cycle anable
showFrequency();
}

Expand Down Expand Up @@ -640,6 +639,7 @@ void doPower() {
else
pwmPowerDuty = 255;
}
pinMode(PWM_PA, OUTPUT);
analogWrite(PWM_PA, pwmPowerDuty);
showPower();
key = browseParameter();
Expand Down Expand Up @@ -685,6 +685,7 @@ void runAction(void (*actionFunc)(uint8_t), KeyValue *tab, uint8_t step, uint8_t
// Processes the current menu option selected
uint8_t doMenu(uint8_t idxMenu) {
delay(PUSH_MIN_DELAY);
enablePWM(0);
switch (idxMenu) {
case KEY_FREQUENCY:
enablePWM(0); // The PWM seems to interfere with the communication with the QN8066.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ void readAllTransmitterInformation() {

// Enable or disable PWM duty cycle
void enablePWM(uint8_t value) {
pinMode(PWM_PA, OUTPUT);
delay(100);
analogWrite(PWM_PA, value); // Turn PA off
delay(100);
Expand Down Expand Up @@ -607,6 +608,7 @@ void doPower() {
else
pwmPowerDuty = 255;
}
pinMode(PWM_PA, OUTPUT);
analogWrite(PWM_PA, pwmPowerDuty);
showPower();
key = browseParameter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ void readAllTransmitterInformation() {

// Enable or disable PWM duty cycle
void enablePWM(uint8_t value) {
pinMode(PWM_PA, OUTPUT);
delay(100);
analogWrite(PWM_PA, value); // Turn PA off
delay(100);
Expand Down Expand Up @@ -650,6 +651,7 @@ void doPower() {
else
pwmPowerDuty = 255;
}
pinMode(PWM_PA, OUTPUT);
analogWrite(PWM_PA, pwmPowerDuty);
showPower();
key = browseParameter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
| | A | GPIO13 |
| | B | GPIO14 |
| | PUSH BUTTON (encoder) | GPIO27 |
| PWM | | |
| | | GPIO12 |
|
Prototype documentation: https://pu2clr.github.io/QN8066/
Expand Down Expand Up @@ -58,7 +60,7 @@
#define ENCODER_PIN_B 14
#define BT_MENU 27

#define PWM_PA 26
#define PWM_PA 12

#define EEPROM_SIZE 512

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ void readAllTransmitterInformation() {

// Enable or disable PWM duty cycle
void enablePWM(uint8_t value) {
pinMode(PWM_PA, OUTPUT);
delay(100);
analogWrite(PWM_PA, value); // Turn PA off
delay(100);
Expand Down Expand Up @@ -693,7 +694,7 @@ void doPower() {
else
pwmPowerDuty = 255;
}
analogWrite(PWM_PA, pwmPowerDuty);
enablePWM(pwmPowerDuty);
showPower();
key = browseParameter();
}
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=QN8066
version=1.3.2
version=1.3.3
author=Ricardo Lima Caratti, pu2clr@gmail.com
maintainer=Ricardo Lima Caratti
sentence=Control your TX/RX QN8066 device
Expand Down

0 comments on commit c207d43

Please sign in to comment.