Compare commits
No commits in common. "8027708b3ec78058842f90e83ace04c70f3fc860" and "2b0f2ae36ea62b406cd0b603786306628bd48fae" have entirely different histories.
8027708b3e
...
2b0f2ae36e
3 changed files with 6 additions and 165 deletions
|
@ -13,21 +13,13 @@ Omezení zde je poměrně malá RAM.
|
||||||
|
|
||||||
Ovládací program je napsán v Qt5. Je třeba modul QSerialPort, jinak na tom není nic extra.
|
Ovládací program je napsán v Qt5. Je třeba modul QSerialPort, jinak na tom není nic extra.
|
||||||
Asi by to šlo naportovat i na Windows, ale chce to minimálně změnit název sériového portu.
|
Asi by to šlo naportovat i na Windows, ale chce to minimálně změnit název sériového portu.
|
||||||
Ovládání je nepodobné obvyklému GUI osciloskopu, ale pokusy s kulatými knoflíky mě přesvědčili
|
|
||||||
o tom, že je to blbost. Na PC, kde je možné použít myš, je lépe jí fakt použít a GUI se
|
|
||||||
může smrsknout na pár položek (Item to move), kterými se vybere čím se má hýbat a kliknutí
|
|
||||||
myši provede kam. Jemně se to dá dostavit kolečkem myši.
|
|
||||||
|
|
||||||
Rozsahy se vybírají rovněž z Combo Boxu. Počáteční nastavení je fakticky uloženo v hardware,
|
|
||||||
kromě Markerů a ofsetu zobrazení kanálů, to se dá uložit v programu. V zásadě by šlo uložit
|
|
||||||
i ostatní v programu a při startu to zpět zapsat do hardware, ale zatím to tak není.
|
|
||||||
|
|
||||||
## server
|
## server
|
||||||
|
|
||||||
Zkusil jsem doplnit ovládání přímo z browseru. Použil jsem balíček v Ubuntu (nebo Debian - např. Malina)
|
Zkusil jsem doplnit ovládání přímo z browseru. Použil jsem balíček v Ubuntu (nebo Debian - např. Malina)
|
||||||
nlohmann-json3-dev plus https://github.com/mattgodbolt/seasocks, takže lze komunikovat s klientem
|
nlohmann-json3-dev plus https://github.com/mattgodbolt/seasocks, takže lze komunikovat s klientem
|
||||||
tímto mechanizmem. Vypadá to, že webové sokety by to mohly zvládnout, zatím to není
|
tímto mechanizmem. Vypadá to, že webové sokety by to mohly zvládnout, zatím to není
|
||||||
úplně doděláno, ale zobrazení chodí. Funguje to jen na Linuxu, není to úplné a ani nebude, je to jen pokus.
|
úplně doděláno, ale zobrazení chodí. Funguje to jen na Linuxu.
|
||||||
|
|
||||||
## bin
|
## bin
|
||||||
|
|
||||||
|
|
|
@ -72,11 +72,10 @@ static constexpr double IMULT = 1.0 / FMULT;
|
||||||
void DisplayWidget::wheelEvent(QWheelEvent * event) {
|
void DisplayWidget::wheelEvent(QWheelEvent * event) {
|
||||||
if (m_ts == nullptr) return;
|
if (m_ts == nullptr) return;
|
||||||
const QPoint d = event->angleDelta();
|
const QPoint d = event->angleDelta();
|
||||||
const double increment = d.y() > 0 ? +1 : -1;
|
const int increment = d.y() > 0 ? +1 : -1;
|
||||||
const double zy = -m_inverse.m22();
|
|
||||||
switch (m_items) {
|
switch (m_items) {
|
||||||
case MOVE_VALUE: {
|
case MOVE_VALUE: {
|
||||||
m_ts->value += uint16_t (increment * zy);
|
m_ts->value += increment * 4;
|
||||||
emit SettingsChanged (m_items);
|
emit SettingsChanged (m_items);
|
||||||
} break;
|
} break;
|
||||||
case MOVE_OFSET: {
|
case MOVE_OFSET: {
|
||||||
|
@ -85,11 +84,11 @@ void DisplayWidget::wheelEvent(QWheelEvent * event) {
|
||||||
} break;
|
} break;
|
||||||
case MOVE_MARKERA: {
|
case MOVE_MARKERA: {
|
||||||
if (marker_type == MARKER_TIME) m_time.a += increment;
|
if (marker_type == MARKER_TIME) m_time.a += increment;
|
||||||
else m_volt.a += increment * zy;
|
else m_volt.a += increment;
|
||||||
} break;
|
} break;
|
||||||
case MOVE_MARKERB: {
|
case MOVE_MARKERB: {
|
||||||
if (marker_type == MARKER_TIME) m_time.b += increment;
|
if (marker_type == MARKER_TIME) m_time.b += increment;
|
||||||
else m_volt.b += increment * zy;
|
else m_volt.b += increment;
|
||||||
} break;
|
} break;
|
||||||
case TIME_ZOOM: {
|
case TIME_ZOOM: {
|
||||||
const double mx = FMULT * double (size().width()) / x_lenght;
|
const double mx = FMULT * double (size().width()) / x_lenght;
|
||||||
|
@ -100,10 +99,8 @@ void DisplayWidget::wheelEvent(QWheelEvent * event) {
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case OFSET_A: {
|
case OFSET_A: {
|
||||||
m_offset.a += increment * zy;
|
|
||||||
} break;
|
} break;
|
||||||
case OFSET_B: {
|
case OFSET_B: {
|
||||||
m_offset.b += increment * zy;
|
|
||||||
} break;
|
} break;
|
||||||
default : {
|
default : {
|
||||||
qDebug ("wheelEvent : %d", int (m_items));
|
qDebug ("wheelEvent : %d", int (m_items));
|
||||||
|
|
|
@ -46,43 +46,6 @@
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="ChannelA">
|
<widget class="QGroupBox" name="ChannelA">
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>78</red>
|
|
||||||
<green>154</green>
|
|
||||||
<blue>6</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>78</red>
|
|
||||||
<green>154</green>
|
|
||||||
<blue>6</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</inactive>
|
|
||||||
<disabled>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>190</red>
|
|
||||||
<green>190</green>
|
|
||||||
<blue>190</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</disabled>
|
|
||||||
</palette>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Channel A</string>
|
<string>Channel A</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -113,43 +76,6 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="ChannelB">
|
<widget class="QGroupBox" name="ChannelB">
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>204</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>204</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</inactive>
|
|
||||||
<disabled>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>190</red>
|
|
||||||
<green>190</green>
|
|
||||||
<blue>190</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</disabled>
|
|
||||||
</palette>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Channel B</string>
|
<string>Channel B</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -180,43 +106,6 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupTriger">
|
<widget class="QGroupBox" name="groupTriger">
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>32</red>
|
|
||||||
<green>74</green>
|
|
||||||
<blue>135</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>32</red>
|
|
||||||
<green>74</green>
|
|
||||||
<blue>135</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</inactive>
|
|
||||||
<disabled>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>190</red>
|
|
||||||
<green>190</green>
|
|
||||||
<blue>190</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</disabled>
|
|
||||||
</palette>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Trigger</string>
|
<string>Trigger</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -253,43 +142,6 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBase">
|
<widget class="QGroupBox" name="groupBase">
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="Button">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>252</red>
|
|
||||||
<green>233</green>
|
|
||||||
<blue>79</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="Button">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>252</red>
|
|
||||||
<green>233</green>
|
|
||||||
<blue>79</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</inactive>
|
|
||||||
<disabled>
|
|
||||||
<colorrole role="Button">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>252</red>
|
|
||||||
<green>233</green>
|
|
||||||
<blue>79</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</disabled>
|
|
||||||
</palette>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Time Base</string>
|
<string>Time Base</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -351,7 +203,7 @@
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="layoutWidget">
|
<widget class="QWidget" name="">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>12</x>
|
<x>12</x>
|
||||||
|
|
Loading…
Reference in a new issue