Serial commands are now case-insensitive #featureadd
This commit is contained in:
parent
b45315f3b5
commit
2f4e42d34a
2 changed files with 4 additions and 0 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue