Refactor Trigger System #635
This commit is contained in:
parent
5fc0f4dc59
commit
d247c13283
|
@ -245,7 +245,7 @@ static void timerCallback(PwmConfig *state) {
|
|||
* Incoming parameters are potentially just values on current stack, so we have to copy
|
||||
* into our own permanent storage, right?
|
||||
*/
|
||||
void copyPwmParameters(PwmConfig *state, int phaseCount, float *switchTimes, int waveCount, pin_state_t **pinStates) {
|
||||
void copyPwmParameters(PwmConfig *state, int phaseCount, float *switchTimes, int waveCount, pin_state_t *const *pinStates) {
|
||||
state->phaseCount = phaseCount;
|
||||
|
||||
for (int phaseIndex = 0; phaseIndex < phaseCount; phaseIndex++) {
|
||||
|
|
|
@ -140,6 +140,6 @@ void startSimplePwmExt(SimplePwm *state,
|
|||
float frequency, float dutyCycle, pwm_gen_callback *stateChangeCallback);
|
||||
|
||||
void copyPwmParameters(PwmConfig *state, int phaseCount, float *switchTimes,
|
||||
int waveCount, pin_state_t **pinStates);
|
||||
int waveCount, pin_state_t *const *pinStates);
|
||||
|
||||
#endif /* PWM_GENERATOR_LOGIC_H_ */
|
||||
|
|
|
@ -225,7 +225,7 @@ void TriggerShape::addEvent(bool useOnlyRisingEdgeForTrigger, angle_t angle, tri
|
|||
shapeDefinitionError = true;
|
||||
return;
|
||||
}
|
||||
wave->setState(/* channelIndex */ 0, /* value */ initialState[i]);
|
||||
wave->setState(/* switchIndex */ 0, /* value */ initialState[i]);
|
||||
}
|
||||
|
||||
isFrontEvent[0] = TV_RISE == stateParam;
|
||||
|
|
|
@ -185,7 +185,7 @@ public:
|
|||
MultiWave wave;
|
||||
|
||||
// todo: add a runtime validation which would verify that this field was set properly
|
||||
// tood: maybe even automate this flag calculation?
|
||||
// todo: maybe even automate this flag calculation?
|
||||
int initialState[PWM_PHASE_MAX_WAVE_PER_PWM];
|
||||
|
||||
int8_t isFrontEvent[PWM_PHASE_MAX_COUNT];
|
||||
|
|
Loading…
Reference in New Issue