Commit graph

67 commits

Author SHA1 Message Date
Filip Ayazi
40e27eeb22 Only write position to physical EEPROM when move finishes 2023-10-11 00:50:36 +01:00
Filip Ayazi
ef05df7eb9 Version bump 2023-10-06 04:35:05 +01:00
Filip Ayazi
a4cfee8a77 Make sangaboard version generic 0.5.x 2023-10-06 04:34:48 +01:00
Filip Ayazi
8d31397110 Illumination: explain cc_test function 2023-10-06 04:28:59 +01:00
Filip Ayazi
0f36232e45 Merge branch 'movement-command-crash' into 'master'
Fix command parsing

See merge request filipayazi/sangaboard-firmware!5
2023-10-06 03:17:14 +00:00
JojoDevel
59b5ae50a4 Handle float moves and check the number of arguments
DeltaStage sends moves commands as floats which led to occasional hard crashes,
this avoids it.

Incorrect number of arguments to move commands is now handled gracefully
and this will later be extended to more commands.
2023-10-06 03:17:14 +00:00
Filip Ayazi
767f86b683 Remove warning, blocking issues were resolved 2023-03-26 01:23:56 +00:00
Filip Ayazi
144093e252 Fix handling of uninitialised EEPROM values
PWM channels now set to 0, CC channel to 30mA, dt to 1000us
2023-03-13 14:50:03 +00:00
Filip Ayazi
c237226428 Swap Z,X motor wiring to match silkscreen 2023-03-13 14:49:23 +00:00
Filip Ayazi
d3bdccad13 illumination: fix pwm values eeprom position (were mixed with frequency) 2023-03-11 03:10:59 +00:00
Filip Ayazi
30eb93c8da Merge branch 'sangaboard-v5'
set version to v1.0.0-dev
2023-03-11 02:16:53 +00:00
Filip Ayazi
c9abc5c847 Merge branch 'check-if-moving' into 'master'
Support for blocking stage moves.

Closes #1

See merge request filipayazi/sangaboard-firmware!1
2023-03-11 01:59:22 +00:00
Filip Ayazi
3aee3f58ce Add -dev to version 2023-03-11 01:52:43 +00:00
Filip Ayazi
c7eb2827a5 Merge branch 'new_env_for_hw_serial' into 'sangaboard-v5'
Hardware serial auto-switching and persistent position/settings on Pico-based boards

See merge request filipayazi/sangaboard-firmware!4
2023-03-11 01:46:29 +00:00
Filip Ayazi
3745e5740b Add missing board command 2023-03-10 00:49:05 +00:00
Filip Ayazi
11f0f12ee1 add get_system_status command 2023-03-09 00:06:55 +00:00
Filip Ayazi
1b3e251783 Support 4 motors
Partial support for > 4 motors, needs a clean way of defining wiring.
2023-03-09 00:05:16 +00:00
Filip Ayazi
51b5b670e6 Handle bool defaults on emulated eeprom platform platforms (fixes #5) 2023-03-08 23:53:03 +00:00
Filip Ayazi
13e9a2c598 Undo version hack 2023-03-08 01:36:31 +00:00
Filip Ayazi
5c0d38f3b2 Illumination module fixes, report as module 2023-03-08 01:22:22 +00:00
Filip Ayazi
225e208eae illumination: use comPort for test output 2023-03-01 04:56:41 +00:00
Filip Ayazi
54c34683c0 Fix serial port switching, archive firmware.elf 2023-03-01 04:52:06 +00:00
Filip Ayazi
ffb0b04c03 Merge branch 'sangaboard-v5' into 'new_env_for_hw_serial'
# Conflicts:
#   src/modules/illumination/illumination.cpp
2023-03-01 04:43:15 +00:00
Filip Ayazi
9df96aae9f constant current illumination control 2023-03-01 04:39:08 +00:00
Filip Ayazi
d3920988b5 Undo version change hack 2023-03-01 04:38:09 +00:00
Filip Ayazi
38231894ae only show 3 motor positions in p? for compatibility 2023-03-01 04:25:30 +00:00
Richard Bowman
4a8481a2d3 Save pico firmware as an artifact
In the future, we could put this on the build server.
2023-02-28 10:35:05 +00:00
Richard Bowman
d9e7c1429a Simplified configuration
I've moved SUPPORT_EEPROM into boards.h
because that seemed simplest.

I've removed a bit of logic related to serial
ports, because we now just listen on both if there
is more than one, using PRIMARY_SERIAL_PORT and
SECONDARY_SERIAL_PORT in boards.h.

I've deleted the `picohw` environment because it's no longer necessary.
2023-02-28 10:30:37 +00:00
Richard Bowman
8a18c1444c Fix precompiler directives
I mistakenly deleted an ifndef in 40439a0ead
thinking that it wasn't matched by an #endif.

This change reverts that error, and it builds properly again.
2023-02-28 10:23:24 +00:00
Richard Bowman
f0ec05cc20 Initialise EEPROM and save periodically
This should be less of a disaster for the emulated
EEPROM on the pico, but could use some finesse
2023-02-22 17:09:51 +00:00
Richard Bowman
28f7b538f0 Enable EEPROM support for pico and ATMEGA boards 2023-02-22 12:31:34 +00:00
Richard Bowman
3e4b3e97eb Store current position in EEPROM
Previously, we held our position in EEPROM so it
persisted even across power cycles.  This seems to have been lost,
so I'm restoring it.
2023-02-22 12:17:45 +00:00
Richard Bowman
40439a0ead Remove ifndef
This appears to be unterminated - I don't understand
how it compiled before, but I'm removing it to get things working again.
2023-02-22 12:12:21 +00:00
Richard Bowman
c38c0b7195 Echo back invalid commands
This was really helpful when debugging dodgy
serial connections - and shouldn't hurt anything
in normal operations.
2023-02-22 12:07:47 +00:00
Richard Bowman
3997d66cde Merge in com port switching from sangaboard v4
I've refactored the use of the serial port, to store the
current serial port in a global variable in a module.
This is set to the most recent port to receive data,
and so we should always be replying to the port
that was used to initiate a command.

If SECONDARY_SERIAL_PORT is not defined, this
should result in no change - if it is, we should be
able to communicate on either port.
2023-02-22 12:05:48 +00:00
Richard Bowman
e65c290ae6 Ignore VSCode suggestion 2023-02-13 15:18:33 +00:00
Richard Bowman
ce762bdb60 Added an environment for pico using HW serial
I wasn't sure how to compile with or without
HW serial support, so I duplicated the "pico"
environment and added a -D HW_SERIAL
2023-02-13 15:18:16 +00:00
Filip Ayazi
84b06972fc Constant current driver fixes 2022-10-25 01:25:38 +01:00
Filip Ayazi
0f4e4b5289 Support HW serial in v5, clean up config 2022-10-11 01:00:31 +01:00
Filip Ayazi
351e5a6b7a Illumination support, change core, breaks hw serial
HW serial temporarily broken due to the change in pico core. This core
has a lot more features e.g. easily changing PWM frequency and supports
both pico cores (currently unused)
2022-10-06 23:04:59 +01:00
Filip Ayazi
fde7a90480 Hardware UART comms + partial v5 modules support 2022-09-03 22:04:28 +01:00
Filip Ayazi
dfd4a99f1f sangaboard v5 basic support 2022-09-03 21:59:29 +01:00
Filip Ayazi
48015c716c light_sensor: update lib filename and fix typo 2022-01-16 21:06:05 +00:00
Filip Ayazi
550c378e3c esp32: fix wiring config, decode stack traces 2022-01-16 21:05:09 +00:00
Filip Ayazi
58fe8a20f8 pico: remove GP prefix from pin numbers 2021-09-04 02:21:43 +01:00
Filip Ayazi
9aa42e7400 Add support for ESP32 platform 2021-09-04 01:19:15 +01:00
Filip Ayazi
1b8ffc88d7 Add example pico wiring configuration to boards.h 2021-08-20 02:31:21 +02:00
Filip Ayazi
6919f63009 Add build CI script 2021-07-18 05:34:24 +01:00
Filip Ayazi
e48f5e9bbf Version string bumped to v1.0-beta 2021-07-18 04:54:53 +01:00
Filip Ayazi
d949cbf29a Add example stm32 bluepill setup 2021-07-18 04:53:57 +01:00