Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
TomSaw committed Jan 11, 2022
1 parent 486217f commit 7498e57
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/arduino_nano/color/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Sensorthread : public modm::pt::Protothread
if (PT_CALL(sensor.readColor()))
{
const auto rgb = data.getColor();
MODM_LOG_INFO << "RGB: " << rgb << "\tHSV: " << modm::color::Hsv(rgb) << modm::endl;
MODM_LOG_INFO << "RGB: " << rgb << "\tHSV: " << modm::color::Hsv888(rgb) << modm::endl;
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_f446re/color/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ThreadOne : public modm::pt::Protothread
if (PT_CALL(sensor.readColor()))
{
const auto rgb = data.getColor();
MODM_LOG_INFO << "RGB: " << rgb << "\tHSV: " << modm::color::Hsv(rgb) << modm::endl;
MODM_LOG_INFO << "RGB: " << rgb << "\tHSV: " << modm::color::Hsv888(rgb) << modm::endl;
}
timeout.restart(500ms);
PT_WAIT_UNTIL(timeout.isExpired());
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f469_discovery/game_of_life/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ uint16_t * displayBuffer;
#define TRAIL_LENGTH ((1 << TRAIL_POWER) + 1)
constexpr uint8_t alive = (1 << TRAIL_POWER);

#define COLOR_SHADE(red, green, blue, fraction) modm::color::Rgb(\
#define COLOR_SHADE(red, green, blue, fraction) modm::color::Rgb888(\
uint8_t(uint32_t(red) * (fraction) / TRAIL_LENGTH), \
uint8_t(uint32_t(green) * (fraction) / TRAIL_LENGTH), \
uint8_t(uint32_t(blue) * (fraction) / TRAIL_LENGTH) )
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f4_discovery/colour_tcs3414/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class ThreadOne : public modm::pt::Protothread
{
if (PT_CALL(sensor.readColor())) {
const auto rgb = data.getColor();
stream << "RGB: " << rgb << "\tHSV: " << modm::color::Hsv(rgb) << modm::endl;
stream << "RGB: " << rgb << "\tHSV: " << modm::color::Hsv888(rgb) << modm::endl;
}
timeout.restart(500ms);
PT_WAIT_UNTIL(timeout.isExpired());
Expand Down
2 changes: 1 addition & 1 deletion src/modm/driver/color/tcs3472.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ struct tcs3472
addr(uint8_t version=5)
{ return version < 5 ? 0x39 : 0x29; }

using Rgb = color::RgbT<uint16_t>;
using Rgb = color::Rgb161616;

struct modm_packed
Data
Expand Down

0 comments on commit 7498e57

Please sign in to comment.