9 Commits

Author SHA1 Message Date
jonny_ji7
1f53fabd19 Create gpio_adc component - outsource readAdc()
remove duplicate code:
function readAdc was used in multiple files, outsourced this to gpio
component
2022-09-12 11:19:47 +02:00
jonny_ji7
586c335896 Create 'handledDisplay' class
To abstract rather complex functions for 7 segment displays e.g. blink text, scroll
text... a class was created.

This makes it possible to have 2 instances for displayTop and
displayBottom resulting in no duplicate code
2022-08-22 16:28:42 +02:00
jonny_ji7
01c5db39c1 Outsource display functions to display.cpp
move functions for initializing and writing to display to new files
display.cpp/hpp
2022-08-21 12:12:56 +02:00
jonny_ji7
dddd54b03a Add MANUAL mode, Add vfd direction support
vfd: extend vfd_setState function with direction enum (default fwd)
main: reduce log output from buzzer task
config: use mos1 as vfd_FWD output
control:
    add MANUAL state: motor can be controlled via preset buttons
    adjust code slightly to support new state (also see updated
    function-diagram)
2022-08-19 16:29:59 +02:00
jonny_ji7
8b9b5ff736 Add control statemachine, optimize vfd logging
Add all logic for the machine to control.cpp
optimize logging (on change only) for vfd functions
2022-08-18 14:23:32 +02:00
jonny_ji7
0aea494783 Add poti and display section; Cleanup
Add readadc function from armchair project
Rework display section
   - show lengthNow on first display
   - show lengthTarget on second display
Prepare for statemachine

Remove unneeded function
Add comments improve structure
2022-08-18 12:46:08 +02:00
jonny_ji7
7fae539f14 Add vfd driver, Add vfd test via buttons
Add vfd.cpp/hpp with functions to control the VFD via 4 digital pins
Add way to test the vfd via SET button (rotate speed level) and START
button (toggle motor on/off)
2022-08-17 14:05:34 +02:00
jonny_ji7
22f8aef8d2 Move code from main to control.cpp, display pages
- move code from testing task to control.cpp
- outsource functions for initializing display and encoder
- delete testing code
- add two display pages (current distance and counter)
- run handle functions for each button
2022-08-17 13:08:05 +02:00
jonny_ji7
a3f3cb340c Add config, buzzer, evalSwitch, switch to c++
Add config.cpp/hpp
    - macros for all input and output pins
    - gloabl evaluated switch objects
    - buzzer object
    - display config
    - encoder config

Move main.c to main.cpp and adjust code to be c++ compatible

add custom library evaluated switch (copied from armchair project)
add buzzer object (copied from armchair project)

add control.cpp/hpp with control task (no function yet)
2022-08-17 10:29:11 +02:00