|
|
@@ -130,33 +130,25 @@ ProtoViewApp* protoview_app_alloc() {
|
|
|
|
|
|
/* Setup rx worker and environment. */
|
|
|
app->txrx->freq_mod_changed = false;
|
|
|
- app->txrx->debug_direct_sampling = true;
|
|
|
- if (app->txrx->debug_direct_sampling) {
|
|
|
- app->txrx->ds_thread = NULL;
|
|
|
- } else {
|
|
|
- app->txrx->worker = subghz_worker_alloc();
|
|
|
- #ifdef PROTOVIEW_DISABLE_SUBGHZ_FILTER
|
|
|
- app->txrx->worker->filter_running = 0;
|
|
|
- #endif
|
|
|
-
|
|
|
- app->txrx->environment = subghz_environment_alloc();
|
|
|
-
|
|
|
- subghz_environment_set_protocol_registry(
|
|
|
- app->txrx->environment, (void*)&protoview_protocol_registry);
|
|
|
-
|
|
|
- app->txrx->receiver =
|
|
|
- subghz_receiver_alloc_init(app->txrx->environment);
|
|
|
-
|
|
|
- subghz_receiver_set_filter(app->txrx->receiver,
|
|
|
- SubGhzProtocolFlag_Decodable);
|
|
|
- subghz_worker_set_overrun_callback(
|
|
|
- app->txrx->worker,
|
|
|
- (SubGhzWorkerOverrunCallback)subghz_receiver_reset);
|
|
|
-
|
|
|
- subghz_worker_set_pair_callback(
|
|
|
- app->txrx->worker, (SubGhzWorkerPairCallback)subghz_receiver_decode);
|
|
|
- subghz_worker_set_context(app->txrx->worker, app->txrx->receiver);
|
|
|
- }
|
|
|
+ app->txrx->debug_direct_sampling = false;
|
|
|
+ app->txrx->ds_thread = NULL;
|
|
|
+ app->txrx->worker = subghz_worker_alloc();
|
|
|
+#ifdef PROTOVIEW_DISABLE_SUBGHZ_FILTER
|
|
|
+ app->txrx->worker->filter_running = 0;
|
|
|
+#endif
|
|
|
+ app->txrx->environment = subghz_environment_alloc();
|
|
|
+ subghz_environment_set_protocol_registry(
|
|
|
+ app->txrx->environment, (void*)&protoview_protocol_registry);
|
|
|
+ app->txrx->receiver =
|
|
|
+ subghz_receiver_alloc_init(app->txrx->environment);
|
|
|
+ subghz_receiver_set_filter(app->txrx->receiver,
|
|
|
+ SubGhzProtocolFlag_Decodable);
|
|
|
+ subghz_worker_set_overrun_callback(
|
|
|
+ app->txrx->worker,
|
|
|
+ (SubGhzWorkerOverrunCallback)subghz_receiver_reset);
|
|
|
+ subghz_worker_set_pair_callback(
|
|
|
+ app->txrx->worker, (SubGhzWorkerPairCallback)subghz_receiver_decode);
|
|
|
+ subghz_worker_set_context(app->txrx->worker, app->txrx->receiver);
|
|
|
|
|
|
app->frequency = subghz_setting_get_default_frequency(app->setting);
|
|
|
app->modulation = 0; /* Defaults to ProtoViewModulations[0]. */
|