mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Fixed current and potential bugs caught by Coverity
Change-Id: I9f9d09dc797ffea062eeb49c881be1d5acb63d7b
This commit is contained in:
committed by
Peter Johnson
parent
b0fec4089b
commit
055ee09825
@@ -126,11 +126,11 @@ void initializeDigital(int32_t *status) {
|
||||
// Ensure that PWM output values are set to OFF
|
||||
for (uint32_t pwm_index = 0; pwm_index < kPwmPins; pwm_index++) {
|
||||
// Initialize port structure
|
||||
DigitalPort* digital_port = new DigitalPort();
|
||||
digital_port->port.pin = pwm_index;
|
||||
DigitalPort digital_port;
|
||||
digital_port.port.pin = pwm_index;
|
||||
|
||||
setPWM(digital_port, kPwmDisabled, status);
|
||||
setPWMPeriodScale(digital_port, 3, status); // Set all to 4x by default.
|
||||
setPWM(&digital_port, kPwmDisabled, status);
|
||||
setPWMPeriodScale(&digital_port, 3, status); // Set all to 4x by default.
|
||||
}
|
||||
|
||||
digitalSystemsInitialized = true;
|
||||
|
||||
Reference in New Issue
Block a user