mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-14 01:48:35 -07:00
Merge branch 'dev' of https://github.com/Flipper-XFW/Xtreme-Firmware into xfw-new-app-system
This commit is contained in:
@@ -74,17 +74,16 @@ typedef struct {
|
|||||||
int32_t t_fine;
|
int32_t t_fine;
|
||||||
} BME680_instance;
|
} BME680_instance;
|
||||||
|
|
||||||
extern const SensorType BMP280;
|
|
||||||
extern const SensorType BME680;
|
extern const SensorType BME680;
|
||||||
/**
|
/**
|
||||||
* @brief Выделение памяти и установка начальных значений датчика BMP280
|
* @brief Выделение памяти и установка начальных значений датчика BMP680
|
||||||
* @param sensor Указатель на создаваемый датчик
|
* @param sensor Указатель на создаваемый датчик
|
||||||
* @return Истина при успехе
|
* @return Истина при успехе
|
||||||
*/
|
*/
|
||||||
bool unitemp_BME680_alloc(Sensor* sensor, char* args);
|
bool unitemp_BME680_alloc(Sensor* sensor, char* args);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Инициализации датчика BMP280
|
* @brief Инициализации датчика BMP680
|
||||||
* @param sensor Указатель на датчик
|
* @param sensor Указатель на датчик
|
||||||
* @return Истина если инициализация упспешная
|
* @return Истина если инициализация упспешная
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ bool unitemp_BMP180_I2C_alloc(Sensor* sensor, char* args) {
|
|||||||
i2c_sensor->minI2CAdr = 0x77 << 1;
|
i2c_sensor->minI2CAdr = 0x77 << 1;
|
||||||
i2c_sensor->maxI2CAdr = 0x77 << 1;
|
i2c_sensor->maxI2CAdr = 0x77 << 1;
|
||||||
|
|
||||||
BMP180_instance* bmx280_instance = malloc(sizeof(BMP180_instance));
|
BMP180_instance* bmx180_instance = malloc(sizeof(BMP180_instance));
|
||||||
i2c_sensor->sensorInstance = bmx280_instance;
|
i2c_sensor->sensorInstance = bmx180_instance;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,12 +30,6 @@ typedef union {
|
|||||||
float value;
|
float value;
|
||||||
} ByteToFl;
|
} ByteToFl;
|
||||||
|
|
||||||
bool unitemp_SCD30_alloc(Sensor* sensor, char* args);
|
|
||||||
bool unitemp_SCD30_init(Sensor* sensor);
|
|
||||||
bool unitemp_SCD30_deinit(Sensor* sensor);
|
|
||||||
UnitempStatus unitemp_SCD30_update(Sensor* sensor);
|
|
||||||
bool unitemp_SCD30_free(Sensor* sensor);
|
|
||||||
|
|
||||||
const SensorType SCD30 = {
|
const SensorType SCD30 = {
|
||||||
.typename = "SCD30",
|
.typename = "SCD30",
|
||||||
.interface = &I2C,
|
.interface = &I2C,
|
||||||
|
|||||||
10
applications/external/unitemp/sensors/SCD40.c
vendored
10
applications/external/unitemp/sensors/SCD40.c
vendored
@@ -19,17 +19,11 @@
|
|||||||
|
|
||||||
// Some information may be seen on https://github.com/sparkfun/SparkFun_SCD30_Arduino_Library
|
// Some information may be seen on https://github.com/sparkfun/SparkFun_SCD30_Arduino_Library
|
||||||
|
|
||||||
#include "SCD30.h"
|
#include "SCD40.h"
|
||||||
#include "../interfaces/I2CSensor.h"
|
#include "../interfaces/I2CSensor.h"
|
||||||
#include "../interfaces/endianness.h"
|
#include "../interfaces/endianness.h"
|
||||||
//#include <3rdparty/everest/include/everest/kremlin/c_endianness.h>
|
//#include <3rdparty/everest/include/everest/kremlin/c_endianness.h>
|
||||||
|
|
||||||
bool unitemp_SCD40_alloc(Sensor* sensor, char* args);
|
|
||||||
bool unitemp_SCD40_init(Sensor* sensor);
|
|
||||||
bool unitemp_SCD40_deinit(Sensor* sensor);
|
|
||||||
UnitempStatus unitemp_SCD40_update(Sensor* sensor);
|
|
||||||
bool unitemp_SCD40_free(Sensor* sensor);
|
|
||||||
|
|
||||||
const SensorType SCD40 = {
|
const SensorType SCD40 = {
|
||||||
.typename = "SCD40",
|
.typename = "SCD40",
|
||||||
.interface = &I2C,
|
.interface = &I2C,
|
||||||
@@ -185,7 +179,7 @@ static bool getSettingValue(Sensor* sensor, uint16_t registerAddress, uint16_t*
|
|||||||
return loadWord(bytes, val);
|
return loadWord(bytes, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get 18 bytes from SCD30
|
// Get 18 bytes from SCD40
|
||||||
// Updates global variables with floats
|
// Updates global variables with floats
|
||||||
// Returns true if success
|
// Returns true if success
|
||||||
static bool readMeasurement(Sensor* sensor) {
|
static bool readMeasurement(Sensor* sensor) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "wifi_deauther_app_i.h"
|
#include "wifi_deauther_app_i.h"
|
||||||
#include "wifi_deauther_uart.h"
|
#include "wifi_deauther_uart.h"
|
||||||
|
|
||||||
|
#include <FreeRTOS.h>
|
||||||
#include <stream_buffer.h>
|
#include <stream_buffer.h>
|
||||||
|
|
||||||
#define BAUDRATE (115200)
|
#define BAUDRATE (115200)
|
||||||
|
|||||||
@@ -471,8 +471,15 @@ static void nfc_protocol_support_scene_save_name_on_enter(NfcApp* instance) {
|
|||||||
bool name_is_empty = furi_string_empty(instance->file_name);
|
bool name_is_empty = furi_string_empty(instance->file_name);
|
||||||
if(name_is_empty) {
|
if(name_is_empty) {
|
||||||
furi_string_set(instance->file_path, NFC_APP_FOLDER);
|
furi_string_set(instance->file_path, NFC_APP_FOLDER);
|
||||||
|
FuriString* prefix = furi_string_alloc_set(
|
||||||
|
nfc_device_get_name(instance->nfc_device, NfcDeviceNameTypeShort));
|
||||||
|
furi_string_replace(prefix, "Mifare", "MF");
|
||||||
|
furi_string_replace(prefix, "Ultralight", "UL");
|
||||||
|
furi_string_replace(prefix, " Plus", "+");
|
||||||
|
furi_string_replace_all(prefix, " ", "_");
|
||||||
name_generator_make_auto(
|
name_generator_make_auto(
|
||||||
instance->text_store, NFC_TEXT_STORE_SIZE, NFC_APP_FILENAME_PREFIX);
|
instance->text_store, NFC_TEXT_STORE_SIZE, furi_string_get_cstr(prefix));
|
||||||
|
furi_string_free(prefix);
|
||||||
furi_string_set(folder_path, NFC_APP_FOLDER);
|
furi_string_set(folder_path, NFC_APP_FOLDER);
|
||||||
} else {
|
} else {
|
||||||
nfc_text_store_set(instance, "%s", furi_string_get_cstr(instance->file_name));
|
nfc_text_store_set(instance, "%s", furi_string_get_cstr(instance->file_name));
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "nfc_app_i.h"
|
#include "nfc_app_i.h"
|
||||||
|
|
||||||
#include <dolphin/dolphin.h>
|
#include <dolphin/dolphin.h>
|
||||||
|
#include <applications/main/archive/helpers/archive_helpers_ext.h>
|
||||||
|
|
||||||
bool nfc_custom_event_callback(void* context, uint32_t event) {
|
bool nfc_custom_event_callback(void* context, uint32_t event) {
|
||||||
furi_assert(context);
|
furi_assert(context);
|
||||||
@@ -468,6 +469,7 @@ int32_t nfc_app(void* p) {
|
|||||||
NfcApp* nfc = nfc_app_alloc();
|
NfcApp* nfc = nfc_app_alloc();
|
||||||
const char* args = p;
|
const char* args = p;
|
||||||
|
|
||||||
|
bool is_favorite = process_favorite_launch((char**)&args);
|
||||||
if(args && strlen(args)) {
|
if(args && strlen(args)) {
|
||||||
if(sscanf(args, "RPC %p", &nfc->rpc_ctx) == 1) {
|
if(sscanf(args, "RPC %p", &nfc->rpc_ctx) == 1) {
|
||||||
rpc_system_app_set_callback(nfc->rpc_ctx, nfc_app_rpc_command_callback, nfc);
|
rpc_system_app_set_callback(nfc->rpc_ctx, nfc_app_rpc_command_callback, nfc);
|
||||||
@@ -492,7 +494,11 @@ int32_t nfc_app(void* p) {
|
|||||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneStart);
|
scene_manager_next_scene(nfc->scene_manager, NfcSceneStart);
|
||||||
}
|
}
|
||||||
|
|
||||||
view_dispatcher_run(nfc->view_dispatcher);
|
if(is_favorite) {
|
||||||
|
favorite_timeout_run(nfc->view_dispatcher, nfc->scene_manager);
|
||||||
|
} else {
|
||||||
|
view_dispatcher_run(nfc->view_dispatcher);
|
||||||
|
}
|
||||||
|
|
||||||
nfc_app_free(nfc);
|
nfc_app_free(nfc);
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#define DOLPHIN_LOCK_EVENT_FLAG (0x1)
|
#define DOLPHIN_LOCK_EVENT_FLAG (0x1)
|
||||||
|
|
||||||
#define TAG "Dolphin"
|
#define TAG "Dolphin"
|
||||||
#define HOURS_IN_TICKS(x) ((x) * 60 * 60 * 1000)
|
#define HOURS_IN_TICKS(x) ((x)*60 * 60 * 1000)
|
||||||
|
|
||||||
static void dolphin_update_clear_limits_timer_period(Dolphin* dolphin);
|
static void dolphin_update_clear_limits_timer_period(Dolphin* dolphin);
|
||||||
|
|
||||||
|
|||||||
@@ -104,9 +104,7 @@ class Main(App):
|
|||||||
self.parser_packs = self.subparsers.add_parser(
|
self.parser_packs = self.subparsers.add_parser(
|
||||||
"packs", help="Assemble asset packs"
|
"packs", help="Assemble asset packs"
|
||||||
)
|
)
|
||||||
self.parser_packs.add_argument(
|
self.parser_packs.add_argument("input_directory", help="Packs source directory")
|
||||||
"input_directory", help="Packs source directory"
|
|
||||||
)
|
|
||||||
self.parser_packs.add_argument(
|
self.parser_packs.add_argument(
|
||||||
"output_directory", help="Packs output directory"
|
"output_directory", help="Packs output directory"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -289,6 +289,18 @@ def _validate_app_imports(target, source, env):
|
|||||||
for line in f:
|
for line in f:
|
||||||
app_syms.add(line.split()[0])
|
app_syms.add(line.split()[0])
|
||||||
unresolved_syms = app_syms - sdk_cache.get_valid_names()
|
unresolved_syms = app_syms - sdk_cache.get_valid_names()
|
||||||
|
ignore_syms = [
|
||||||
|
sym
|
||||||
|
for sym in unresolved_syms
|
||||||
|
if sym.startswith(
|
||||||
|
(
|
||||||
|
"totp_",
|
||||||
|
"app_api_accumulator_",
|
||||||
|
)
|
||||||
|
)
|
||||||
|
]
|
||||||
|
for sym in ignore_syms:
|
||||||
|
unresolved_syms.remove(sym)
|
||||||
if unresolved_syms:
|
if unresolved_syms:
|
||||||
warning_msg = fg.brightyellow(
|
warning_msg = fg.brightyellow(
|
||||||
f"{source[0].path}: app may not be runnable. Symbols not resolved using firmware's API: "
|
f"{source[0].path}: app may not be runnable. Symbols not resolved using firmware's API: "
|
||||||
|
|||||||
@@ -139,7 +139,10 @@ class Main(App):
|
|||||||
SlideshowMain(no_exit=True)(
|
SlideshowMain(no_exit=True)(
|
||||||
[
|
[
|
||||||
"-i",
|
"-i",
|
||||||
str(pathlib.Path(self.args.resources) / "../../../assets/slideshow/xfwfirstboot"),
|
str(
|
||||||
|
pathlib.Path(self.args.resources)
|
||||||
|
/ "../../../assets/slideshow/xfwfirstboot"
|
||||||
|
),
|
||||||
"-o",
|
"-o",
|
||||||
str(pathlib.Path(self.args.resources) / "dolphin/xfwfirstboot.bin"),
|
str(pathlib.Path(self.args.resources) / "dolphin/xfwfirstboot.bin"),
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user