mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-13 18:19:33 +00:00
Added 4msps, and fixes
This commit is contained in:
@@ -85,6 +85,7 @@ SubGhzDView::SubGhzDView(NavigationView& nav)
|
|||||||
nav_.push<SubGhzDRecentEntryDetailView>(entry);
|
nav_.push<SubGhzDRecentEntryDetailView>(entry);
|
||||||
};
|
};
|
||||||
baseband::set_subghzd(0); // am
|
baseband::set_subghzd(0); // am
|
||||||
|
receiver_model.set_sampling_rate(4'000'000);
|
||||||
receiver_model.enable();
|
receiver_model.enable();
|
||||||
signal_token_tick_second = rtc_time::signal_tick_second += [this]() {
|
signal_token_tick_second = rtc_time::signal_tick_second += [this]() {
|
||||||
on_tick_second();
|
on_tick_second();
|
||||||
@@ -98,7 +99,7 @@ void SubGhzDView::on_tick_second() {
|
|||||||
recent_entries_view.set_dirty();
|
recent_entries_view.set_dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubGhzDView::on_data(const WeatherDataMessage* data) {
|
void SubGhzDView::on_data(const SubGhzDDataMessage* data) {
|
||||||
SubGhzDRecentEntry key{data->sensorType, data->id};
|
SubGhzDRecentEntry key{data->sensorType, data->id};
|
||||||
auto matching_recent = find(recent, key.key());
|
auto matching_recent = find(recent, key.key());
|
||||||
if (matching_recent != std::end(recent)) {
|
if (matching_recent != std::end(recent)) {
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class SubGhzDView : public View {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void on_tick_second();
|
void on_tick_second();
|
||||||
void on_data(const WeatherDataMessage* data); // TODO
|
void on_data(const SubGhzDDataMessage* data); // TODO
|
||||||
|
|
||||||
NavigationView& nav_;
|
NavigationView& nav_;
|
||||||
RxRadioState radio_state_{
|
RxRadioState radio_state_{
|
||||||
@@ -123,9 +123,9 @@ class SubGhzDView : public View {
|
|||||||
SubGhzDRecentEntriesView recent_entries_view{columns, recent};
|
SubGhzDRecentEntriesView recent_entries_view{columns, recent};
|
||||||
|
|
||||||
MessageHandlerRegistration message_handler_packet{
|
MessageHandlerRegistration message_handler_packet{
|
||||||
Message::ID::WeatherData,
|
Message::ID::SubGhzDData,
|
||||||
[this](Message* const p) {
|
[this](Message* const p) {
|
||||||
const auto message = static_cast<const WeatherDataMessage*>(p);
|
const auto message = static_cast<const SubGhzDDataMessage*>(p);
|
||||||
this->on_data(message);
|
this->on_data(message);
|
||||||
}};
|
}};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ WeatherView::WeatherView(NavigationView& nav)
|
|||||||
nav_.push<WeatherRecentEntryDetailView>(entry);
|
nav_.push<WeatherRecentEntryDetailView>(entry);
|
||||||
};
|
};
|
||||||
baseband::set_weather();
|
baseband::set_weather();
|
||||||
|
receiver_model.set_sampling_rate(4'000'000);
|
||||||
receiver_model.enable();
|
receiver_model.enable();
|
||||||
signal_token_tick_second = rtc_time::signal_tick_second += [this]() {
|
signal_token_tick_second = rtc_time::signal_tick_second += [this]() {
|
||||||
on_tick_second();
|
on_tick_second();
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class WeatherProcessor : public BasebandProcessor {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr size_t baseband_fs = 4'000'000; // it works, I think we need to write that master clock in the baseband_threat , even later we decimate it.
|
static constexpr size_t baseband_fs = 4'000'000; // it works, I think we need to write that master clock in the baseband_threat , even later we decimate it.
|
||||||
static constexpr uint32_t nsPerDecSamp = 500 * 8; // In current sw , we do not scale it due to clock. We scaled it due to less array buffer sampes due to /8 decimation.
|
static constexpr uint32_t nsPerDecSamp = 250 * 8; // In current sw , we do not scale it due to clock. We scaled it due to less array buffer sampes due to /8 decimation.
|
||||||
// TODO , Pending to investigate , why ticks are not proportional to the SR clock, 500 nseg (2Mhz) , 250 nseg (4Mhz) ??? ;previous comment : "we nees ms to has to divide by 1000"
|
// TODO , Pending to investigate , why ticks are not proportional to the SR clock, 500 nseg (2Mhz) , 250 nseg (4Mhz) ??? ;previous comment : "we nees ms to has to divide by 1000"
|
||||||
|
|
||||||
/* Array Buffer aux. used in decim0 and decim1 IQ c16 signed data ; (decim0 defines the max length of the array) */
|
/* Array Buffer aux. used in decim0 and decim1 IQ c16 signed data ; (decim0 defines the max length of the array) */
|
||||||
|
|||||||
Reference in New Issue
Block a user