clean up
This commit is contained in:
1 parent
5fb3f3882a
commit
b77e907702
5 files changed
+8
-3
No files matched your search
@@ -51,6 +51,7 @@ uint32_t setLoopStacksize(void);
|
||||
#include "WMath.h"
|
||||
#include "HardwareSerial.h"
|
||||
#include "pulse.h"
|
||||
#include "HardwarePWM.h"
|
||||
#endif
|
||||
|
||||
#include "delay.h"
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
*/
|
||||
/**************************************************************************/
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "HardwarePWM.h"
|
||||
|
||||
HardwarePWM PWM0(NRF_PWM0);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#ifndef HARDWAREPWM_H_
|
||||
#define HARDWAREPWM_H_
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "common_inc.h"
|
||||
#include "nrf.h"
|
||||
|
||||
class HardwarePWM
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
#ifndef COMMON_INC_H_
|
||||
#define COMMON_INC_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "compiler_macro.h"
|
||||
#include "verify.h"
|
||||
#include "common_func.h"
|
||||
|
||||
@@ -78,7 +78,7 @@ void loop()
|
||||
|
||||
// fade in from min to max
|
||||
// inverted PWM0 (false), PWM1 (true), PWM2 (false)
|
||||
for (int fadeValue = 0 ; fadeValue <= maxValue; fadeValue += 512)
|
||||
for (int fadeValue = 0 ; fadeValue <= maxValue; fadeValue += 1024)
|
||||
{
|
||||
inverted = false;
|
||||
|
||||
@@ -96,7 +96,7 @@ void loop()
|
||||
|
||||
// fade out from max to min
|
||||
// inverted PWM0 (false), PWM1 (true), PWM2 (false)
|
||||
for (int fadeValue = maxValue ; fadeValue >= 0; fadeValue -= 512)
|
||||
for (int fadeValue = maxValue ; fadeValue >= 0; fadeValue -= 1024)
|
||||
{
|
||||
inverted = false;
|
||||
|
||||
|
||||
Reference in new issue
Block a user