Skip to content

Commit

Permalink
Merge pull request #352 from Round-Pi/dev2
Browse files Browse the repository at this point in the history
typo combing
  • Loading branch information
xMasterX authored Feb 21, 2023
2 parents a0b02b0 + f9db06b commit 202a97e
Show file tree
Hide file tree
Showing 53 changed files with 122 additions and 121 deletions.
2 changes: 1 addition & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Our Discord Community:
Also check the changelog in releases for latest updates!

### Current modified and new Sub-GHz protocols list:
Thanks to Official team (to thier SubGHz Developer, Skorp) for implementing decoders for these protocols.
Thanks to Official team (to their SubGHz Developer, Skorp) for implementing decoders for these protocols.

Encoders/sending made by Eng1n33r & @xMasterX:

Expand Down
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ if GetOption("fullenv") or any(
basic_dist = distenv.DistCommand("fw_dist", distenv["DIST_DEPENDS"])
distenv.Default(basic_dist)

dist_dir = distenv.GetProjetDirName()
dist_dir = distenv.GetProjectDirName()
fap_dist = [
distenv.Install(
distenv.Dir(f"#/dist/{dist_dir}/apps/debug_elf"),
Expand Down
2 changes: 1 addition & 1 deletion applications/main/infrared/views/infrared_progress_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
extern "C" {
#endif

/** Anonumous instance */
/** Anonymous instance */
typedef struct InfraredProgressView InfraredProgressView;

/** Callback for back button handling */
Expand Down
2 changes: 1 addition & 1 deletion applications/main/lfrfid/scenes/lfrfid_scene_clear_t5577.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ static void lfrfid_clear_t5577_password_and_config_to_EM(LfRfid* app) {
T55xxTiming* t55xxtiming = malloc(sizeof(T55xxTiming));
Popup* popup = app->popup;
char curr_buf[32] = {};
//TODO: use .txt file in resourses for passwords.
//TODO: use .txt file in resources for passwords.
const uint32_t default_passwords[] = {
0x51243648, 0x000D8787, 0x19920427, 0x50524F58, 0xF9DCEBA0, 0x65857569, 0x05D73B9F,
0x89A69E60, 0x314159E0, 0xAA55BBBB, 0xA5B4C3D2, 0x1C0B5848, 0x00434343, 0x444E4752,
Expand Down
6 changes: 3 additions & 3 deletions applications/main/nfc/helpers/nfc_emv_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @param aid - AID number array
* @param aid_len - AID length
* @param aid_name - string to keep AID name
* @return - true if AID found, false otherwies
* @return - true if AID found, false otherwise
*/
bool nfc_emv_parser_get_aid_name(
Storage* storage,
Expand All @@ -21,7 +21,7 @@ bool nfc_emv_parser_get_aid_name(
* @param storage Storage instance
* @param country_code - ISO 3166 country code
* @param country_name - string to keep country name
* @return - true if country found, false otherwies
* @return - true if country found, false otherwise
*/
bool nfc_emv_parser_get_country_name(
Storage* storage,
Expand All @@ -32,7 +32,7 @@ bool nfc_emv_parser_get_country_name(
* @param storage Storage instance
* @param currency_code - ISO 3166 currency code
* @param currency_name - string to keep currency name
* @return - true if currency found, false otherwies
* @return - true if currency found, false otherwise
*/
bool nfc_emv_parser_get_currency_name(
Storage* storage,
Expand Down
2 changes: 1 addition & 1 deletion applications/main/subghz/helpers/subghz_chat.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ struct SubGhzChatWorker {
SubGhzTxRxWorker* subghz_txrx;

volatile bool worker_running;
volatile bool worker_stoping;
volatile bool worker_stopping;
FuriMessageQueue* event_queue;
uint32_t last_time_rx_data;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ static int32_t subghz_frequency_analyzer_worker_thread(void* context) {

// First stage: coarse scan
for(size_t i = 0; i < subghz_setting_get_frequency_count(instance->setting); i++) {
uint32_t current_frequnecy = subghz_setting_get_frequency(instance->setting, i);
if(furi_hal_subghz_is_frequency_valid(current_frequnecy) &&
(current_frequnecy != 467750000) &&
uint32_t current_frequency = subghz_setting_get_frequency(instance->setting, i);
if(furi_hal_subghz_is_frequency_valid(current_frequency) &&
(current_frequency != 467750000) &&
!((furi_hal_subghz.radio_type == SubGhzRadioExternal) &&
(current_frequnecy >= 311900000 && current_frequnecy <= 312200000))) {
(current_frequency >= 311900000 && current_frequency <= 312200000))) {
furi_hal_spi_acquire(furi_hal_subghz.spi_bus_handle);
cc1101_switch_to_idle(furi_hal_subghz.spi_bus_handle);
frequency =
cc1101_set_frequency(furi_hal_subghz.spi_bus_handle, current_frequnecy);
cc1101_set_frequency(furi_hal_subghz.spi_bus_handle, current_frequency);

cc1101_calibrate(furi_hal_subghz.spi_bus_handle);
do {
Expand Down Expand Up @@ -330,4 +330,4 @@ void subghz_frequency_analyzer_worker_set_trigger_level(

float subghz_frequency_analyzer_worker_get_trigger_level(SubGhzFrequencyAnalyzerWorker* instance) {
return instance->trigger_level;
}
}
2 changes: 1 addition & 1 deletion applications/main/subghz/helpers/subghz_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ typedef enum {
/** SubGhzHopperState state */
typedef enum {
SubGhzHopperStateOFF,
SubGhzHopperStateRunnig,
SubGhzHopperStateRunning,
SubGhzHopperStatePause,
SubGhzHopperStateRSSITimeOut,
} SubGhzHopperState;
Expand Down
4 changes: 2 additions & 2 deletions applications/main/subghz/scenes/subghz_scene_read_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ bool subghz_scene_read_raw_on_event(void* context, SceneManagerEvent event) {

float rssi = furi_hal_subghz_get_rssi();

if(float_is_equal(subghz->txrx->raw_threshold_rssi, SUBGHZ_RAW_TRESHOLD_MIN)) {
if(float_is_equal(subghz->txrx->raw_threshold_rssi, SUBGHZ_RAW_THRESHOLD_MIN)) {
subghz_read_raw_add_data_rssi(subghz->subghz_read_raw, rssi, true);
subghz_protocol_raw_save_to_file_pause(
(SubGhzProtocolDecoderRAW*)subghz->txrx->decoder_result, false);
Expand Down Expand Up @@ -421,4 +421,4 @@ void subghz_scene_read_raw_on_exit(void* context) {

//filter restoration
subghz_receiver_set_filter(subghz->txrx->receiver, subghz->txrx->filter);
}
}
16 changes: 8 additions & 8 deletions applications/main/subghz/scenes/subghz_scene_receiver_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ enum SubGhzSettingIndex {
SubGhzSettingIndexBinRAW,
SubGhzSettingIndexSound,
SubGhzSettingIndexLock,
SubGhzSettingIndexRAWThesholdRSSI,
SubGhzSettingIndexRAWThresholdRSSI,
};

#define RAW_THRESHOLD_RSSI_COUNT 11
const char* const raw_theshold_rssi_text[RAW_THRESHOLD_RSSI_COUNT] = {
const char* const raw_threshold_rssi_text[RAW_THRESHOLD_RSSI_COUNT] = {
"-----",
"-85.0",
"-80.0",
Expand All @@ -26,7 +26,7 @@ const char* const raw_theshold_rssi_text[RAW_THRESHOLD_RSSI_COUNT] = {
"-40.0",

};
const float raw_theshold_rssi_value[RAW_THRESHOLD_RSSI_COUNT] = {
const float raw_threshold_rssi_value[RAW_THRESHOLD_RSSI_COUNT] = {
-90.0f,
-85.0f,
-80.0f,
Expand All @@ -47,7 +47,7 @@ const char* const hopping_text[HOPPING_COUNT] = {
};
const uint32_t hopping_value[HOPPING_COUNT] = {
SubGhzHopperStateOFF,
SubGhzHopperStateRunnig,
SubGhzHopperStateRunning,
};

#define SPEAKER_COUNT 2
Expand Down Expand Up @@ -213,8 +213,8 @@ static void subghz_scene_receiver_config_set_raw_threshold_rssi(VariableItem* it
SubGhz* subghz = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item);

variable_item_set_current_value_text(item, raw_theshold_rssi_text[index]);
subghz->txrx->raw_threshold_rssi = raw_theshold_rssi_value[index];
variable_item_set_current_value_text(item, raw_threshold_rssi_text[index]);
subghz->txrx->raw_threshold_rssi = raw_threshold_rssi_value[index];
}

static void subghz_scene_receiver_config_var_list_enter_callback(void* context, uint32_t index) {
Expand Down Expand Up @@ -320,9 +320,9 @@ void subghz_scene_receiver_config_on_enter(void* context) {
subghz_scene_receiver_config_set_raw_threshold_rssi,
subghz);
value_index = value_index_float(
subghz->txrx->raw_threshold_rssi, raw_theshold_rssi_value, RAW_THRESHOLD_RSSI_COUNT);
subghz->txrx->raw_threshold_rssi, raw_threshold_rssi_value, RAW_THRESHOLD_RSSI_COUNT);
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, raw_theshold_rssi_text[value_index]);
variable_item_set_current_value_text(item, raw_threshold_rssi_text[value_index]);
}
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdVariableItemList);
}
Expand Down
4 changes: 2 additions & 2 deletions applications/main/subghz/scenes/subghz_scene_receiver_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
subghz_rx(subghz, subghz->txrx->preset->frequency);
}
if(subghz->txrx->hopper_state == SubGhzHopperStatePause) {
subghz->txrx->hopper_state = SubGhzHopperStateRunnig;
subghz->txrx->hopper_state = SubGhzHopperStateRunning;
}
subghz->state_notifications = SubGhzNotificationStateRx;
} else {
Expand All @@ -175,7 +175,7 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
subghz_rx(subghz, subghz->txrx->preset->frequency);
}
if(subghz->txrx->hopper_state == SubGhzHopperStatePause) {
subghz->txrx->hopper_state = SubGhzHopperStateRunnig;
subghz->txrx->hopper_state = SubGhzHopperStateRunning;
}
subghz->state_notifications = SubGhzNotificationStateRx;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void subghz_scene_set_seed_bft_on_enter(void* context) {
SubGhz* subghz = context;

// Setup view
// roguemaster don't steal!!!
// RogueMaster don't steal!!!
ByteInput* byte_input = subghz->byte_input;
byte_input_set_header_text(byte_input, "Enter SEED in hex");
byte_input_set_result_callback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bool subghz_scene_set_seed_faac_on_event(void* context, SceneManagerEvent event)
seed,
"FAAC_SLH",
subghz->txrx->preset);
// rogueemaster dont steal!
// RogueMaster dont steal!
uint8_t seed_data[sizeof(uint32_t)] = {0};
for(size_t i = 0; i < sizeof(uint32_t); i++) {
seed_data[sizeof(uint32_t) - i - 1] = (seed >> i * 8) & 0xFF;
Expand Down
2 changes: 1 addition & 1 deletion applications/main/subghz/subghz.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
subghz->txrx->history = subghz_history_alloc();
}

subghz->txrx->raw_threshold_rssi = SUBGHZ_RAW_TRESHOLD_MIN;
subghz->txrx->raw_threshold_rssi = SUBGHZ_RAW_THRESHOLD_MIN;
subghz->txrx->worker = subghz_worker_alloc();

subghz->txrx->fff_data = flipper_format_string_alloc();
Expand Down
2 changes: 1 addition & 1 deletion applications/main/subghz/subghz_history.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void subghz_history_get_text_item_menu(SubGhzHistory* instance, FuriString* outp
*
* @param instance - SubGhzHistory instance
* @param output - FuriString* output
* @return bool - is FUUL
* @return bool - is FULL
*/
bool subghz_history_get_text_space_left(SubGhzHistory* instance, FuriString* output);

Expand Down
4 changes: 2 additions & 2 deletions applications/main/subghz/subghz_history_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ uint32_t subghz_history_rand_range(uint32_t min, uint32_t max);
*
* @param file - Stream*
* @param is_negative_start - first value is negative or positive?
* @param current_position - 0 if started from begining
* @param current_position - 0 if started from beginning
* @param empty_line - add RAW_Data to this line
* @return true
* @return false
Expand Down Expand Up @@ -160,4 +160,4 @@ bool subghz_history_stream_seek_to_key(Stream* stream, const char* key, bool str
* @return true
* @return false
*/
bool subghz_history_stream_read_value(Stream* stream, FuriString* value, bool* last);
bool subghz_history_stream_read_value(Stream* stream, FuriString* value, bool* last);
2 changes: 1 addition & 1 deletion applications/main/subghz/subghz_i.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ void subghz_hopper_update(SubGhz* subghz) {
return;
}
} else {
subghz->txrx->hopper_state = SubGhzHopperStateRunnig;
subghz->txrx->hopper_state = SubGhzHopperStateRunning;
}
// Select next frequency
if(subghz->txrx->hopper_idx_frequency <
Expand Down
6 changes: 3 additions & 3 deletions applications/main/subghz/views/receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define MENU_ITEMS 4u
#define UNLOCK_CNT 3

#define SUBGHZ_RAW_TRESHOLD_MIN -90.0f
#define SUBGHZ_RAW_THRESHOLD_MIN -90.0f

typedef struct {
FuriString* item_str;
Expand Down Expand Up @@ -80,10 +80,10 @@ void subghz_receiver_rssi(SubGhzViewReceiver* instance, float rssi) {
instance->view,
SubGhzViewReceiverModel * model,
{
if(rssi < SUBGHZ_RAW_TRESHOLD_MIN) {
if(rssi < SUBGHZ_RAW_THRESHOLD_MIN) {
model->u_rssi = 0;
} else {
model->u_rssi = (uint8_t)(rssi - SUBGHZ_RAW_TRESHOLD_MIN);
model->u_rssi = (uint8_t)(rssi - SUBGHZ_RAW_THRESHOLD_MIN);
}
},
true);
Expand Down
20 changes: 10 additions & 10 deletions applications/main/subghz/views/subghz_read_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ typedef struct {
FuriString* sample_write;
FuriString* file_name;
uint8_t* rssi_history;
uint8_t rssi_curret;
uint8_t rssi_current;
bool rssi_history_end;
uint8_t ind_write;
uint8_t ind_sin;
Expand Down Expand Up @@ -62,17 +62,17 @@ void subghz_read_raw_add_data_rssi(SubGhzReadRAW* instance, float rssi, bool tra
furi_assert(instance);
uint8_t u_rssi = 0;

if(rssi < SUBGHZ_RAW_TRESHOLD_MIN) {
if(rssi < SUBGHZ_RAW_THRESHOLD_MIN) {
u_rssi = 0;
} else {
u_rssi = (uint8_t)((rssi - SUBGHZ_RAW_TRESHOLD_MIN) / 2.7);
u_rssi = (uint8_t)((rssi - SUBGHZ_RAW_THRESHOLD_MIN) / 2.7);
}

with_view_model(
instance->view,
SubGhzReadRAWModel * model,
{
model->rssi_curret = u_rssi;
model->rssi_current = u_rssi;
if(trace) {
model->rssi_history[model->ind_write++] = u_rssi;
} else {
Expand Down Expand Up @@ -206,10 +206,10 @@ void subghz_read_raw_draw_rssi(Canvas* canvas, SubGhzReadRAWModel* model) {
canvas_draw_line(canvas, i, 47, i, 47 - model->rssi_history[i]);
}
canvas_draw_line(
canvas, model->ind_write + 1, 47, model->ind_write + 1, 47 - model->rssi_curret);
canvas, model->ind_write + 1, 47, model->ind_write + 1, 47 - model->rssi_current);
if(model->ind_write > 3) {
canvas_draw_line(
canvas, model->ind_write - 1, 47, model->ind_write - 1, 47 - model->rssi_curret);
canvas, model->ind_write - 1, 47, model->ind_write - 1, 47 - model->rssi_current);

for(uint8_t i = 13; i < 47; i += width * 2) {
canvas_draw_line(canvas, model->ind_write, i, model->ind_write, i + width);
Expand All @@ -231,13 +231,13 @@ void subghz_read_raw_draw_rssi(Canvas* canvas, SubGhzReadRAWModel* model) {
SUBGHZ_READ_RAW_RSSI_HISTORY_SIZE - 1,
47,
SUBGHZ_READ_RAW_RSSI_HISTORY_SIZE - 1,
47 - model->rssi_curret);
47 - model->rssi_current);
canvas_draw_line(
canvas,
SUBGHZ_READ_RAW_RSSI_HISTORY_SIZE + 1,
47,
SUBGHZ_READ_RAW_RSSI_HISTORY_SIZE + 1,
47 - model->rssi_curret);
47 - model->rssi_current);

for(uint8_t i = 13; i < 47; i += width * 2) {
canvas_draw_line(
Expand Down Expand Up @@ -266,9 +266,9 @@ void subghz_read_raw_draw_threshold_rssi(Canvas* canvas, SubGhzReadRAWModel* mod
uint8_t x = 118;
uint8_t y = 48;

if(model->raw_threshold_rssi > SUBGHZ_RAW_TRESHOLD_MIN) {
if(model->raw_threshold_rssi > SUBGHZ_RAW_THRESHOLD_MIN) {
uint8_t x = 118;
y -= (uint8_t)((model->raw_threshold_rssi - SUBGHZ_RAW_TRESHOLD_MIN) / 2.7);
y -= (uint8_t)((model->raw_threshold_rssi - SUBGHZ_RAW_THRESHOLD_MIN) / 2.7);

uint8_t width = 3;
for(uint8_t i = 0; i < x; i += width * 2) {
Expand Down
2 changes: 1 addition & 1 deletion applications/main/subghz/views/subghz_read_raw.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <gui/view.h>
#include "../helpers/subghz_custom_event.h"

#define SUBGHZ_RAW_TRESHOLD_MIN -90.0f
#define SUBGHZ_RAW_THRESHOLD_MIN -90.0f

typedef struct SubGhzReadRAW SubGhzReadRAW;

Expand Down
2 changes: 1 addition & 1 deletion applications/main/u2f/u2f_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ bool u2f_data_cert_key_load(uint8_t* cert_key) {
uint8_t key_slot = 0;
uint32_t version = 0;

// Check if unique key exists in secure eclave and generate it if missing
// Check if unique key exists in secure eclave(typo?) and generate it if missing
if(!furi_hal_crypto_verify_key(U2F_DATA_FILE_ENCRYPTION_KEY_SLOT_UNIQUE)) return false;

FuriString* filetype;
Expand Down
4 changes: 2 additions & 2 deletions applications/main/unirfremix/unirfremix_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ static void render_callback(Canvas* canvas, void* ctx) {
//canvas_draw_str(canvas, 0, 40, "D: ");
//canvas_draw_str(canvas, 0, 50, "Ok: ");

//PNGs are located in assets/icons/UniRFRemix before compiliation
//PNGs are located in assets/icons/UniRFRemix before compilation

//Icons for Labels
//canvas_draw_icon(canvas, 0, 0, &I_UniRFRemix_LeftAlignedButtons_9x64);
Expand Down Expand Up @@ -1046,4 +1046,4 @@ int32_t unirfremix_app(void* p) {
unirfremix_free(app, true);

return 0;
}
}
7 changes: 4 additions & 3 deletions applications/plugins/tetris_game/tetris_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,10 @@ static void
uint16_t oldNumLines = tetris_state->numLines;
tetris_state->numLines += numLines;
if((oldNumLines / 10) % 10 != (tetris_state->numLines / 10) % 10) {
nextFallSpeed = tetris_state->fallSpeed - (100 / (tetris_state->numLines / 10));
if (nextFallSpeed >= MIN_FALL_SPEED){
tetris_state->fallSpeed = nextFallSpeed;
nextFallSpeed =
tetris_state->fallSpeed - (100 / (tetris_state->numLines / 10));
if(nextFallSpeed >= MIN_FALL_SPEED) {
tetris_state->fallSpeed = nextFallSpeed;
}
}
}
Expand Down
Loading

0 comments on commit 202a97e

Please sign in to comment.