Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finite Machine states inherit from OpInterface #154

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ default_envs = uno

[env]
framework = arduino
extra_scripts =
pre:scripts/preBuild.py
extra_scripts =
pre:scripts/preBuild.py

[env:uno]
platform = atmelavr
Expand Down
2 changes: 1 addition & 1 deletion scripts/preBuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Import("env")
print("Pre build script")

# Reads the current git tag of the repo and returns the version number
# Reads the current git tag of the repo and returns the version number
# elements
# In case there are changes since the last tag, the dirty flag is set
# In case the git tag does not match the x.y.z format, 0.0.0 is used as fallback
Expand Down
10 changes: 7 additions & 3 deletions src/ayab/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,18 @@ void Controller::update() {
* \brief Cache Encoder values
*/
void Controller::cacheEncoders() {
// update machine state data
/* ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { */ // FIXME tests SEGFAULT
#ifndef AYAB_TESTS
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
#endif
m_beltShift = GlobalEncoders::getBeltShift();
m_carriage = GlobalEncoders::getCarriage();
m_direction = GlobalEncoders::getDirection();
m_hallActive = GlobalEncoders::getHallActive();
m_position = GlobalEncoders::getPosition();
/* } */
#ifndef AYAB_TESTS
}
#endif
}

/*!
Expand Down
12 changes: 6 additions & 6 deletions test/mocks/avr/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
#define __STRINGIFY(x) #x
#endif /* !defined(__DOXYGEN__) */

/**
\file
\@{
/**
\file
\@{
*/


Expand Down Expand Up @@ -218,8 +218,8 @@
}

ISR_ALIAS(INT1_vect, INT0_vect);
\endcode
\endcode

*/
# define ISR_ALIAS(vector, target_vector)
#else /* real code */
Expand Down Expand Up @@ -346,7 +346,7 @@
}

ISR (INT1_vect, ISR_ALIASOF (INT0_vect));
\endcode
\endcode
*/
# define ISR_ALIASOF(target_vector)
#else /* !DOXYGEN */
Expand Down
Loading