Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Adafruit WipperSnapper
version=1.0.0-beta.100
version=1.0.0-beta.101
author=Adafruit
maintainer=Adafruit <[email protected]>
sentence=Arduino application for Adafruit.io WipperSnapper
Expand Down
2 changes: 1 addition & 1 deletion src/Wippersnapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
#endif

#define WS_VERSION \
"1.0.0-beta.100" ///< WipperSnapper app. version (semver-formatted)
"1.0.0-beta.101" ///< WipperSnapper app. version (semver-formatted)

// Reserved Adafruit IO MQTT topics
#define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic
Expand Down
3 changes: 2 additions & 1 deletion src/components/ledc/ws_ledc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ bool ws_ledc::analogWrite(uint8_t pin, int value) {

// Calculate duty cycle for the `value` passed in
// (assumes 12-bit resolution, 2^12)
uint32_t dutyCycle = (4095 / 255) * min(value, 255);
uint32_t dutyCycle =
(uint32_t)(((double)4095 / 255.0) * min((uint32_t)value, (uint32_t)255));

// Call duty cycle write
return setDuty(pin, dutyCycle);
Expand Down
Loading