mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-10 05:59:08 -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;
|
||||
} BME680_instance;
|
||||
|
||||
extern const SensorType BMP280;
|
||||
extern const SensorType BME680;
|
||||
/**
|
||||
* @brief Выделение памяти и установка начальных значений датчика BMP280
|
||||
* @brief Выделение памяти и установка начальных значений датчика BMP680
|
||||
* @param sensor Указатель на создаваемый датчик
|
||||
* @return Истина при успехе
|
||||
*/
|
||||
bool unitemp_BME680_alloc(Sensor* sensor, char* args);
|
||||
|
||||
/**
|
||||
* @brief Инициализации датчика BMP280
|
||||
* @brief Инициализации датчика BMP680
|
||||
* @param sensor Указатель на датчик
|
||||
* @return Истина если инициализация упспешная
|
||||
*/
|
||||
|
||||
@@ -56,8 +56,8 @@ bool unitemp_BMP180_I2C_alloc(Sensor* sensor, char* args) {
|
||||
i2c_sensor->minI2CAdr = 0x77 << 1;
|
||||
i2c_sensor->maxI2CAdr = 0x77 << 1;
|
||||
|
||||
BMP180_instance* bmx280_instance = malloc(sizeof(BMP180_instance));
|
||||
i2c_sensor->sensorInstance = bmx280_instance;
|
||||
BMP180_instance* bmx180_instance = malloc(sizeof(BMP180_instance));
|
||||
i2c_sensor->sensorInstance = bmx180_instance;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,12 +30,6 @@ typedef union {
|
||||
float value;
|
||||
} 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 = {
|
||||
.typename = "SCD30",
|
||||
.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
|
||||
|
||||
#include "SCD30.h"
|
||||
#include "SCD40.h"
|
||||
#include "../interfaces/I2CSensor.h"
|
||||
#include "../interfaces/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 = {
|
||||
.typename = "SCD40",
|
||||
.interface = &I2C,
|
||||
@@ -185,7 +179,7 @@ static bool getSettingValue(Sensor* sensor, uint16_t registerAddress, uint16_t*
|
||||
return loadWord(bytes, val);
|
||||
}
|
||||
|
||||
// Get 18 bytes from SCD30
|
||||
// Get 18 bytes from SCD40
|
||||
// Updates global variables with floats
|
||||
// Returns true if success
|
||||
static bool readMeasurement(Sensor* sensor) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "wifi_deauther_app_i.h"
|
||||
#include "wifi_deauther_uart.h"
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
#include <stream_buffer.h>
|
||||
|
||||
#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);
|
||||
if(name_is_empty) {
|
||||
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(
|
||||
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);
|
||||
} else {
|
||||
nfc_text_store_set(instance, "%s", furi_string_get_cstr(instance->file_name));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "nfc_app_i.h"
|
||||
|
||||
#include <dolphin/dolphin.h>
|
||||
#include <applications/main/archive/helpers/archive_helpers_ext.h>
|
||||
|
||||
bool nfc_custom_event_callback(void* context, uint32_t event) {
|
||||
furi_assert(context);
|
||||
@@ -468,6 +469,7 @@ int32_t nfc_app(void* p) {
|
||||
NfcApp* nfc = nfc_app_alloc();
|
||||
const char* args = p;
|
||||
|
||||
bool is_favorite = process_favorite_launch((char**)&args);
|
||||
if(args && strlen(args)) {
|
||||
if(sscanf(args, "RPC %p", &nfc->rpc_ctx) == 1) {
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define DOLPHIN_LOCK_EVENT_FLAG (0x1)
|
||||
|
||||
#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);
|
||||
|
||||
|
||||
@@ -104,9 +104,7 @@ class Main(App):
|
||||
self.parser_packs = self.subparsers.add_parser(
|
||||
"packs", help="Assemble asset packs"
|
||||
)
|
||||
self.parser_packs.add_argument(
|
||||
"input_directory", help="Packs source directory"
|
||||
)
|
||||
self.parser_packs.add_argument("input_directory", help="Packs source directory")
|
||||
self.parser_packs.add_argument(
|
||||
"output_directory", help="Packs output directory"
|
||||
)
|
||||
|
||||
@@ -289,6 +289,18 @@ def _validate_app_imports(target, source, env):
|
||||
for line in f:
|
||||
app_syms.add(line.split()[0])
|
||||
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:
|
||||
warning_msg = fg.brightyellow(
|
||||
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)(
|
||||
[
|
||||
"-i",
|
||||
str(pathlib.Path(self.args.resources) / "../../../assets/slideshow/xfwfirstboot"),
|
||||
str(
|
||||
pathlib.Path(self.args.resources)
|
||||
/ "../../../assets/slideshow/xfwfirstboot"
|
||||
),
|
||||
"-o",
|
||||
str(pathlib.Path(self.args.resources) / "dolphin/xfwfirstboot.bin"),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user