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_volatile.h"
#include "string.h"
void parseData() {
@ -128,6 +129,7 @@ void serialPrintState() {
void updateParams() {
serialIncoming = false;
strupr(serialMessageIn);
if (strcmp(serialMessageIn, "GAIN_F") == 0) {
updateGainFactor(serialLong);
} else if (strcmp(serialMessageIn, "VFOL") == 0) {

View file

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