mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-31 02:23:04 -07:00
merge manually formatted stuff too
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
#include "../js_modules.h"
|
||||
#include <m-array.h>
|
||||
|
||||
#define TAG "js_serial"
|
||||
#define TAG "JsSerial"
|
||||
|
||||
#define RX_BUF_LEN 2048
|
||||
|
||||
typedef struct {
|
||||
@@ -529,14 +530,14 @@ static int32_t js_serial_expect_check_pattern_start(
|
||||
int32_t pattern_last) {
|
||||
size_t array_len = PatternArray_size(patterns);
|
||||
if((pattern_last + 1) >= (int32_t)array_len) {
|
||||
return (-1);
|
||||
return -1;
|
||||
}
|
||||
for(size_t i = pattern_last + 1; i < array_len; i++) {
|
||||
if(PatternArray_get(patterns, i)->data[0] == value) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return (-1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void js_serial_expect(struct mjs* mjs) {
|
||||
|
||||
Reference in New Issue
Block a user