3d-gussner
003b2f6899
Change FINDA from ADC to digital
...
Fix rebase issues
2021-08-31 06:59:29 +02:00
Yuri D'Elia
c7f3fae266
Implement an initial Motion ISR for AVR
...
This is a tentative/crude implementation of an Init and ISR for the MMU
in order to check the motion API.
We remove the "extern void Isr", declaring it "static inline" instead.
We need to inline the ISR here in order to avoid the function call.
Include the missing speed_table data in the executable. This bumps the
code size to ~60% of the flash.
Implemement motion::Init to setup the ISR and timers, and replace the
call in main from tmc::Init to motion::Init. Motion will init each
driver every time the axis is enabled, so there should be no need for
a global module initialization (we need SPI, but this is initialized
earlier on by it's own module anyway).
The timer is currently setup without any HAL or proper TIMER1 wrapper.
This is to be improved later.
The real MMU unit seems to slow down quite a bit during acceleration.
At this point we need to inline some methods in PulseGen to avoid
overhead, however this breaks the stubs.
2021-08-27 10:13:23 +02:00
Alex Voinea
8766642a21
Turn off all LEDs after Init
2021-08-23 08:18:47 +02:00
D.R.racer
a982381728
Only start a new command if the previous one finished
...
... that means with or without an error
and remember the Command's request message - to identify the responses
2021-08-12 10:30:40 +02:00
D.R.racer
c14c79f3ac
Do not blink the left LED on start
2021-08-11 10:33:32 +02:00
D.R.racer
2f5dff6c5b
Introduce short namespace aliases
...
especially for modules
2021-08-04 11:03:56 +02:00
Alex Voinea
9232e55563
millis interrupt
2021-08-04 10:51:33 +02:00
D.R.racer
751ee46450
Add bit masks for error codes for the TMC drivers
...
+ add common error handling for idler and selector
+ improve error handling in command_base
+ rename ERR1xxxx errors to ERRxxxx (remove the '1')
2021-08-02 07:45:45 +02:00
D.R.racer
8a1df52d79
Add support for reporting MMU errors via S3 msg
2021-07-26 09:34:40 +02:00
D.R.racer
c81072d1d5
Add sending of response messages
2021-07-13 17:53:31 +02:00
Alex Voinea
4281e89e5d
HAL adc
2021-07-12 16:55:37 +02:00
Yuri D'Elia
169665331e
Change the pin definitions in order to be valid types
...
Remove the constructor from GPIO_pin so that we can use brace
initialization at compile time.
Rewrite the contents of pins.h to construct GPIO_pin types directly by
the use of a simple preprocessor macro.
Makes the code type-check and easier to read/extend.
2021-07-05 15:20:11 +02:00
Yuri D'Elia
ab01413116
Call LED::Step() correctly
2021-06-30 12:39:03 +02:00
D.R.racer
ffae941a28
Fix unit tests of load/unload filament
2021-06-30 07:39:31 +02:00
D.R.racer
9a8038ccb6
Add user_input module and use it instead of raw buttons
...
Encapsulates buttons and commands coming from the communication
2021-06-30 07:39:31 +02:00
D.R.racer
ede475c5a6
Introduce Timebase module, refactor timing code + unit tests
2021-06-21 10:22:17 +02:00
Alex Voinea
19bc26219b
Fix usart not working
2021-06-18 06:43:55 +02:00
Alex Voinea
113f9d7664
Fix build
2021-06-18 06:42:28 +02:00
Alex Voinea
6bd4db2681
Functional SHR16
2021-06-18 06:42:28 +02:00
D.R.racer
58fe013471
Fix compilation
2021-06-16 06:43:20 +02:00
D.R.racer
dfb57bcae5
Add Load filament state machine
...
+ printer's fsensor (external) module
+ state machine for loading to bondtech
2021-06-14 07:34:59 +02:00
D.R.racer
ea65b75120
Add Eject filament operation
...
+ refactor other state machines a bit - Reset() now has the parameter which comes in the RequestMsg
2021-06-14 07:34:59 +02:00
D.R.racer
96be4b18a2
main - add Idler and Selector modules into main loop stepping
2021-06-14 07:34:59 +02:00
D.R.racer
05ff998c01
Lay out the other high-level commands/operations
...
- cut, eject, load filament, toolchange
- uncomment them in main.cpp
- their implementation is still empty
2021-06-14 07:34:59 +02:00
D.R.racer
5b4eb0cee3
Extract Unload filament into a separate file
...
+ cleanup the object structure
+ add no_command as the starting "operation" to simplify the rest of the command handling at runtime
2021-06-14 07:34:59 +02:00
D.R.racer
271a2dd7df
Minor tweaks after rebase onto main
2021-06-14 07:34:59 +02:00
D.R.racer
6f1624b718
Make logic prototype compilable
2021-06-14 07:34:59 +02:00
D.R.racer
2159558d88
Prototype of Unload Filament command/operation
...
+ related stuff:
- command decoding+processing+reporting in main.cpp
- slight refactoring of modules
2021-06-14 07:34:59 +02:00
D.R.racer
9f2b5e5ecb
Add vscode configuration to allow easier switching among firmware and unit tests
2021-05-31 12:28:47 +02:00
D.R.racer
004db59da0
Add shift register interface and improve LED integration with it
2021-05-26 09:29:32 +02:00
D.R.racer
6cb072ce79
Rebase onto main + clean up the code a bit
2021-05-25 11:55:28 +02:00
D.R.racer
fce2195558
Interface module for driving LEDs
...
+ start shaping up main.cpp
+ make the usage of namespaces and class names more consistent throughout the whole project
+ refactor related unit tests accordingly
2021-05-25 11:00:30 +02:00
Alex Voinea
47528c3bca
USART hal prototype
2021-05-24 12:32:10 +02:00
Alex Voinea
c378e71018
SPI example
2021-05-17 19:11:35 +03:00
Alex Voinea
13ee425352
Configurable SPI CPHA and CPOL
2021-05-17 17:45:31 +03:00
Alex Voinea
57abb7ecc4
Example TMC2130 pinout
2021-05-17 17:10:02 +03:00
Alex Voinea
dc9528b4ea
SPI hal: Winning combo
2021-05-17 09:01:22 +03:00
Alex Voinea
ac4fdd30ad
spi hal checkpoint
2021-05-17 08:42:21 +03:00
Alex Voinea
47400f16c6
GPIO hal prototype ( #9 )
...
* gpio hal prototype
* Example gpio hal usage
* Use uint8_t for GPIO enums
2021-05-14 15:42:41 +02:00
D.R.racer
ec44ef5f23
Prepare main.cpp
2021-04-19 07:03:47 +02:00
D.R.racer
257d0ec340
Prepare parts of the build system
...
extracted and slightly modified from Buddy-FW, still doesn't work
2021-04-19 07:03:47 +02:00