mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
Replaced .h C headers with c-prefixed version and added std:: prefix to C standard library usage (#90)
This was not done to stdint.h for brevity in type names. Also removed "using namespace std;".
This commit is contained in:
committed by
Peter Johnson
parent
776a991d61
commit
5a82f73d9b
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "HAL/DIO.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
#include "DigitalInternal.h"
|
||||
|
||||
@@ -100,7 +100,7 @@ void setPWMDutyCycle(void* pwmGenerator, double dutyCycle, int32_t* status) {
|
||||
if (pwmPeriodPower < 4) {
|
||||
// The resolution of the duty cycle drops close to the highest
|
||||
// frequencies.
|
||||
rawDutyCycle = rawDutyCycle / pow(2.0, 4 - pwmPeriodPower);
|
||||
rawDutyCycle = rawDutyCycle / std::pow(2.0, 4 - pwmPeriodPower);
|
||||
}
|
||||
if (id < 4)
|
||||
digitalSystem->writePWMDutyCycleA(id, (uint8_t)rawDutyCycle, status);
|
||||
|
||||
Reference in New Issue
Block a user