mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-31 02:23:04 -07:00
Merge remote-tracking branch 'ofw/dev' into mntm-dev
This commit is contained in:
@@ -221,7 +221,7 @@ static void js_badusb_is_connected(struct mjs* mjs) {
|
||||
|
||||
uint16_t get_keycode_by_name(JsBadusbInst* badusb, const char* key_name, size_t name_len) {
|
||||
if(name_len == 1) { // Single char
|
||||
return (ASCII_TO_KEY(badusb->layout, key_name[0]));
|
||||
return ASCII_TO_KEY(badusb->layout, key_name[0]);
|
||||
}
|
||||
|
||||
for(size_t i = 0; i < COUNT_OF(key_codes); i++) {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#include "furi_hal_random.h"
|
||||
#include <float.h>
|
||||
|
||||
#define JS_MATH_PI ((double)M_PI)
|
||||
#define JS_MATH_E ((double)M_E)
|
||||
#define JS_MATH_PI ((double)M_PI)
|
||||
#define JS_MATH_E ((double)M_E)
|
||||
#define JS_MATH_EPSILON ((double)DBL_EPSILON)
|
||||
|
||||
#define TAG "JsMath"
|
||||
|
||||
@@ -106,4 +106,4 @@ static const FlipperAppPluginDescriptor plugin_descriptor = {
|
||||
|
||||
const FlipperAppPluginDescriptor* js_notification_ep(void) {
|
||||
return &plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -217,4 +217,4 @@ static const FlipperAppPluginDescriptor textbox_plugin_descriptor = {
|
||||
|
||||
const FlipperAppPluginDescriptor* js_textbox_ep(void) {
|
||||
return &textbox_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user