Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
con_exp.cpp@2:d9745be6c253, 2022-08-04 (annotated)
- Committer:
- fionalin
- Date:
- Thu Aug 04 15:14:29 2022 -0400
- Revision:
- 2:d9745be6c253
hehe forgot to commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fionalin | 2:d9745be6c253 | 1 | #include <cstdint> |
fionalin | 2:d9745be6c253 | 2 | #include <cstdio> |
fionalin | 2:d9745be6c253 | 3 | #include <mbed.h> |
fionalin | 2:d9745be6c253 | 4 | #include "con_exp.h" |
fionalin | 2:d9745be6c253 | 5 | #include "capsense.h" |
fionalin | 2:d9745be6c253 | 6 | #include "stepper.h" |
fionalin | 2:d9745be6c253 | 7 | |
fionalin | 2:d9745be6c253 | 8 | bool ContinuousExperiment::is_done() { |
fionalin | 2:d9745be6c253 | 9 | return state == DONE; |
fionalin | 2:d9745be6c253 | 10 | } |
fionalin | 2:d9745be6c253 | 11 | |
fionalin | 2:d9745be6c253 | 12 | std::vector<std::tuple<int32_t, uint32_t>>& ContinuousExperiment::report() { |
fionalin | 2:d9745be6c253 | 13 | return data; |
fionalin | 2:d9745be6c253 | 14 | } |
fionalin | 2:d9745be6c253 | 15 | |
fionalin | 2:d9745be6c253 | 16 | void ContinuousExperiment::start() { |
fionalin | 2:d9745be6c253 | 17 | state = MOVING; |
fionalin | 2:d9745be6c253 | 18 | move_counter = delta_steps; |
fionalin | 2:d9745be6c253 | 19 | } |
fionalin | 2:d9745be6c253 | 20 | |
fionalin | 2:d9745be6c253 | 21 | void ContinuousExperiment::reset() { |
fionalin | 2:d9745be6c253 | 22 | state = IDLE; |
fionalin | 2:d9745be6c253 | 23 | } |