diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-04-16 17:10:34 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-04-16 17:10:34 +0200 |
commit | fbe6e49386d134b030b4a64fc0f4658b9c371c6e (patch) | |
tree | 72e373f9916d871cc35320e50295b5e414aa4687 /sw/relays.cpp | |
parent | 9bc0bc5fc01c5e638bc325dd2080c2b8bfa5a81f (diff) | |
download | glutte-batteries-fbe6e49386d134b030b4a64fc0f4658b9c371c6e.tar.gz glutte-batteries-fbe6e49386d134b030b4a64fc0f4658b9c371c6e.tar.bz2 glutte-batteries-fbe6e49386d134b030b4a64fc0f4658b9c371c6e.zip |
Check relay toggling functionality
Diffstat (limited to 'sw/relays.cpp')
-rw-r--r-- | sw/relays.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/relays.cpp b/sw/relays.cpp index 0f39fb9..1b93713 100644 --- a/sw/relays.cpp +++ b/sw/relays.cpp @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2019 Matthias P. Braendli + * Copyright (c) 2020 Matthias P. Braendli * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -37,7 +37,8 @@ struct pending_event_t { static constexpr uint32_t RELAY_SIGNAL_HOLD_TIME_US = 400000uL; -static constexpr size_t PENDING_EVENTS_SIZE = 8; +static constexpr size_t NUM_RELAYS = 3; +static constexpr size_t PENDING_EVENTS_SIZE = NUM_RELAYS * 2; // two events per relay at most static pending_event_t pending_events[PENDING_EVENTS_SIZE]; |