Serial commands are now case-insensitive #featureadd

This commit is contained in:
Vsevolod Merenkov 2020-05-03 14:51:16 +03:00
parent b45315f3b5
commit 2f4e42d34a
2 changed files with 4 additions and 0 deletions

View file

@ -1,5 +1,6 @@
#include "pP_cmd.h" #include "pP_cmd.h"
#include "pP_volatile.h" #include "pP_volatile.h"
#include "string.h"
void parseData() { void parseData() {
@ -128,6 +129,7 @@ void serialPrintState() {
void updateParams() { void updateParams() {
serialIncoming = false; serialIncoming = false;
strupr(serialMessageIn);
if (strcmp(serialMessageIn, "GAIN_F") == 0) { if (strcmp(serialMessageIn, "GAIN_F") == 0) {
updateGainFactor(serialLong); updateGainFactor(serialLong);
} else if (strcmp(serialMessageIn, "VFOL") == 0) { } else if (strcmp(serialMessageIn, "VFOL") == 0) {

View file

@ -1,5 +1,6 @@
#include "i2c.h" #include "i2c.h"
#include "stdint.h" #include "stdint.h"
#include "string.h"
#define buffSize 40 #define buffSize 40
bool serialIncoming = false; bool serialIncoming = false;
@ -125,6 +126,7 @@ void serialPrintState() {
void updateParams() { void updateParams() {
serialIncoming = false; serialIncoming = false;
strupr(serialMessageIn);
if (strcmp(serialMessageIn, "GAIN_F") == 0) { if (strcmp(serialMessageIn, "GAIN_F") == 0) {
write(CMD_GAIN_F, (uint16_t)serialLong); write(CMD_GAIN_F, (uint16_t)serialLong);
} else if (strcmp(serialMessageIn, "VFOL") == 0) { } else if (strcmp(serialMessageIn, "VFOL") == 0) {