Work on spectrum
This commit is contained in:
@@ -279,6 +279,7 @@ void RadioSetupPage::build(FormWindow * window)
|
|||||||
new Subtitle(window, grid.getLabelSlot(), STR_HAPTIC_LABEL);
|
new Subtitle(window, grid.getLabelSlot(), STR_HAPTIC_LABEL);
|
||||||
grid.nextLine();
|
grid.nextLine();
|
||||||
|
|
||||||
|
// Haptic mode
|
||||||
// Haptic mode
|
// Haptic mode
|
||||||
new StaticText(window, grid.getLabelSlot(true), STR_MODE);
|
new StaticText(window, grid.getLabelSlot(true), STR_MODE);
|
||||||
new Choice(window, grid.getFieldSlot(), STR_VBEEPMODE, -2, 1, GET_SET_DEFAULT(g_eeGeneral.hapticMode));
|
new Choice(window, grid.getFieldSlot(), STR_VBEEPMODE, -2, 1, GET_SET_DEFAULT(g_eeGeneral.hapticMode));
|
||||||
|
|||||||
@@ -81,6 +81,18 @@ class ScaleWindow: public Window
|
|||||||
Window(parent, rect)
|
Window(parent, rect)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void paint(BitmapBuffer * dc) override
|
||||||
|
{
|
||||||
|
/*for (uint32_t frequency =
|
||||||
|
((reusableBuffer.spectrumAnalyser.freq - reusableBuffer.spectrumAnalyser.span / 2) / 10000000) * 10000000 + 10000000;; frequency += 10000000) {
|
||||||
|
int offset = frequency - (reusableBuffer.spectrumAnalyser.freq - reusableBuffer.spectrumAnalyser.span / 2);
|
||||||
|
int x = offset / reusableBuffer.spectrumAnalyser.step;
|
||||||
|
if ((frequency / 1000000) % 2 == 0) {
|
||||||
|
//dc->drawNumber(x, 2, frequency / 1000000, FONT(XS) | CENTERED);
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class SpectrumWindow : public Window
|
class SpectrumWindow : public Window
|
||||||
@@ -124,9 +136,9 @@ class SpectrumWindow : public Window
|
|||||||
break;
|
break;
|
||||||
dc->drawVerticalLine(x, 0, height(), STASHED, CURVE_AXIS_COLOR);
|
dc->drawVerticalLine(x, 0, height(), STASHED, CURVE_AXIS_COLOR);
|
||||||
|
|
||||||
if ((frequency / 1000000) % 2 == 0) {
|
/*if ((frequency / 1000000) % 2 == 0) {
|
||||||
dc->drawNumber(x, SCALE_TOP - 2, frequency / 1000000, FONT(XS) | CENTERED);
|
dc->drawNumber(x, SCALE_TOP - 2, frequency / 1000000, FONT(XS) | CENTERED);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint8_t power = 20;; power += 20) {
|
for (uint8_t power = 20;; power += 20) {
|
||||||
@@ -172,8 +184,8 @@ RadioSpectrumAnalyser::RadioSpectrumAnalyser(uint8_t moduleIdx) :
|
|||||||
Page(ICON_RADIO_TOOLS),
|
Page(ICON_RADIO_TOOLS),
|
||||||
moduleIdx(moduleIdx)
|
moduleIdx(moduleIdx)
|
||||||
{
|
{
|
||||||
buildBody(&body);
|
|
||||||
start();
|
start();
|
||||||
|
buildBody(&body);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadioSpectrumAnalyser::buildBody(FormWindow * window)
|
void RadioSpectrumAnalyser::buildBody(FormWindow * window)
|
||||||
|
|||||||
Reference in New Issue
Block a user