compile fix (#114)

* multi fix commit

- refactoring leddevicefactory
- adalight: default for "delayAfterConnect" is 1s now - needed for most arduino's because of there special behaviour on open
- fadecandy: new option for disabling configuration send - if you want to keep your fadecandy defaults
- Hyperion.cpp: simplify createSmoothing discussed in #105
- smoothing:
-- add option for continuous output
-- when updatedelay>0 and continousOutput is disabled, buffer is flushed correctly after no input is detected

* add doxygen to travis

* fix code

* fix compile fir ws281x pwm

* remove git merge stuff

* fix compile
This commit is contained in:
redPanther 2016-07-13 16:19:19 +02:00 committed by brindosch
parent 904aad5f1c
commit 946f9fc603
2 changed files with 11 additions and 11 deletions

View File

@ -296,14 +296,14 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
else if (type == "ws281x")
{
device = new LedDeviceWS281x(
deviceConfig.get("gpio", 18).asInt();
leds = deviceConfig.get("leds", 256).asInt();
freq = deviceConfig.get("freq", (Json::UInt)800000ul).asInt();
dmanum = deviceConfig.get("dmanum", 5).asInt();
deviceConfig.get("pwmchannel", 0).asInt();
deviceConfig.get("invert", 0).asInt();
deviceConfig.get("rgbw", 0).asInt();
whiteAlgorithm = deviceConfig.get("white_algorithm","").asString();
deviceConfig.get("gpio", 18).asInt(),
deviceConfig.get("leds", 256).asInt(),
deviceConfig.get("freq", (Json::UInt)800000ul).asInt(),
deviceConfig.get("dmanum", 5).asInt(),
deviceConfig.get("pwmchannel", 0).asInt(),
deviceConfig.get("invert", 0).asInt(),
deviceConfig.get("rgbw", 0).asInt(),
deviceConfig.get("white_algorithm","").asString()
);
}
#endif

View File

@ -582,7 +582,7 @@ unsigned int LedDeviceWS2812b::mem_phys_to_virt(uint32_t phys)
// Map a peripheral's IO memory into our virtual memory, so we can read/write it directly
void * LedDeviceWS2812b::map_peripheral(uint32_t base, uint32_t len)
{
int fd = open("/dev/mem", O_RDWR);
int fd = ::open("/dev/mem", O_RDWR);
void * vaddr;
if (fd < 0)
@ -691,7 +691,7 @@ void LedDeviceWS2812b::initHardware()
// Use /proc/self/pagemap to figure out the mapping between virtual and physical addresses
pid = getpid();
sprintf(pagemap_fn, "/proc/%d/pagemap", pid);
fd = open(pagemap_fn, O_RDONLY);
fd = ::open(pagemap_fn, O_RDONLY);
if (fd < 0)
{
@ -704,7 +704,7 @@ void LedDeviceWS2812b::initHardware()
fatal("Failed to seek on %s: %m\n", pagemap_fn);
}
printf("Page map: %d pages\n", NUM_PAGES);
printf("Page map: %i pages\n", (int)NUM_PAGES);
for (unsigned int i = 0; i < NUM_PAGES; i++)
{
uint64_t pfn;