This shows you the differences between two versions of the page.
pm:prj2025:avaduva:vlad_andrei.chira [2025/05/24 20:50] vlad_andrei.chira [Software Design] |
pm:prj2025:avaduva:vlad_andrei.chira [2025/05/24 21:37] (current) vlad_andrei.chira [Hardware Design] |
||
---|---|---|---|
Line 55: | Line 55: | ||
For the pushbutton: one side --> Gnd, other side --> Port 33 | For the pushbutton: one side --> Gnd, other side --> Port 33 | ||
- | The battery positive line goes into a switch that disable the battery when using the USB. Then it goes into the TP4056 charging module, who's output is then stepped up to 5V by the miniature boost converter. | + | The battery positive line goes into a switch that disables the battery when using the USB. Then it goes into the TP4056 charging module, who's output is then stepped up to 5V by the miniature boost converter. |
===== Software Design ===== | ===== Software Design ===== | ||
Line 170: | Line 170: | ||
delay(200); | delay(200); | ||
</code> | </code> | ||
- | ===== Rezultate Obţinute ===== | ||
- | <note tip> | + | ** UI code ** |
- | Care au fost rezultatele obţinute în urma realizării proiectului vostru. | + | |
- | </note> | + | |
+ | The TFT library only provides primitives and text, so drawing graphs means drawing them from scratch. The DisplayManager class handles the UI based on the state of the application (see Finite State Machine approach above). | ||
+ | |||
+ | <code cpp> | ||
+ | void DisplayManager::update(bool dirty) { | ||
+ | if (currentState_ == lastState_ && !dirty) return; | ||
+ | |||
+ | switch (currentState_) { | ||
+ | case State::SplashScreen: drawSplashScreen(); break; | ||
+ | case State::MainMenu: drawMainMenu(); break; | ||
+ | case State::NetworkScan: drawNetworkScan(); break; | ||
+ | case State::ChannelOccupancy: drawChannelOccupancy(); break; | ||
+ | case State::SignalStrength: drawSignalStrength(); break; | ||
+ | case State::MacSniffing: drawMacSniffing(); break; | ||
+ | case State::DeauthMonitoring: drawDeauthMonitoring(); break; | ||
+ | } | ||
+ | lastState_ = currentState_; | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | SPI is not fast enough to draw the entire screen continuously without flicker, so only if the state changed or the dirty flag is set manually will (re)rendering occur. Alternatively I can only draw things that will change, such as a graph curve, but keep all labels and axes untouched. | ||
+ | ===== Results ===== | ||
+ | |||
+ | Here are some photos of the UI: | ||
+ | |||
+ | {{:pm:prj2025:avaduva:splash.jpeg?700|}} | ||
+ | |||
+ | {{:pm:prj2025:avaduva:scan_list.jpeg?700|}} | ||
+ | |||
+ | {{:pm:prj2025:avaduva:main_menu.jpeg?700|}} | ||
+ | |||
+ | {{:pm:prj2025:avaduva:channel_occ.jpeg?700|}} | ||
===== Concluzii ===== | ===== Concluzii ===== | ||
Line 186: | Line 214: | ||
</note> | </note> | ||
- | ===== Jurnal ===== | ||
- | |||
- | <note tip> | ||
- | Puteți avea și o secțiune de jurnal în care să poată urmări asistentul de proiect progresul proiectului. | ||
- | </note> | ||
===== Bibliografie/Resurse ===== | ===== Bibliografie/Resurse ===== |