Revision b23ca7cc test/periphery-lld/A3906_v1/aos_test_A3906.c
test/periphery-lld/A3906_v1/aos_test_A3906.c | ||
---|---|---|
85 | 85 |
void _wheelDirectionTest(BaseSequentialStream* stream, aos_test_a3906data_t* data, wheel_t wheel, direction_t direction, aos_testresult_t* result) |
86 | 86 |
{ |
87 | 87 |
// local variables |
88 |
uint32_t status;
|
|
88 |
int32_t status; |
|
89 | 89 |
bool qei_valid; |
90 | 90 |
apalQEICount_t qei_count[2]; |
91 | 91 |
apalQEIDirection_t qei_direction; |
... | ... | |
96 | 96 |
status = apalQEIGetPosition((wheel == WHEEL_LEFT) ? data->qei.left : data->qei.right, &qei_count[0]); |
97 | 97 |
// increase PWM incrementally and read QEI data |
98 | 98 |
for (apalPWMwidth_t pwm_width = APAL_PWM_WIDTH_MIN; pwm_width < APAL_PWM_WIDTH_MAX; ++pwm_width) { |
99 |
status |= a3906_lld_set_pwm(data->pwm.driver, (wheel == WHEEL_LEFT) ?
|
|
99 |
status = a3906_lld_set_pwm(data->pwm.driver, (wheel == WHEEL_LEFT) ? |
|
100 | 100 |
((direction == DIRECTION_FORWARD) ? data->pwm.channel.left_forward : data->pwm.channel.left_backward) : |
101 | 101 |
((direction == DIRECTION_FORWARD) ? data->pwm.channel.right_forward : data->pwm.channel.right_backward), |
102 | 102 |
pwm_width); |
... | ... | |
138 | 138 |
void _wheelSpeedTest(BaseSequentialStream* stream, aos_test_a3906data_t* data, wheel_t wheel, direction_t direction, aos_testresult_t* result) |
139 | 139 |
{ |
140 | 140 |
// local variables |
141 |
uint32_t status;
|
|
141 |
int32_t status; |
|
142 | 142 |
apalQEICount_t qei_range; |
143 | 143 |
apalQEICount_t qei_count[2] = {0}; |
144 | 144 |
apalQEICount_t qei_increments[2] = {0}; |
... | ... | |
216 | 216 |
|
217 | 217 |
// local variables |
218 | 218 |
aos_testresult_t result = {0, 0}; |
219 |
uint32_t status = 0;
|
|
219 |
int32_t status;
|
|
220 | 220 |
a3906_lld_power_t power_state; |
221 | 221 |
apalQEICount_t qei_count[2][2]; |
222 | 222 |
uint32_t timeout_counter; |
Also available in: Unified diff