mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
fixes to small test tools to compile cleanly (#67)
* fixes to small test tools to compile cleanly * Another small change to allow -DENABLE_TESTS to compile on osmc with qt5
This commit is contained in:
parent
917dc26fd5
commit
fda861a1c1
@ -54,7 +54,7 @@ void setColor(char* colorStr)
|
||||
unsigned ledCnt = 50;
|
||||
std::vector<ColorRgb> buff(ledCnt, color);
|
||||
|
||||
LedDeviceWs2801 ledDevice("/dev/spidev0.0", 40000);
|
||||
LedDeviceWs2801 ledDevice("/dev/spidev0.0", 40000, 500000);
|
||||
ledDevice.open();
|
||||
ledDevice.write(buff);
|
||||
}
|
||||
@ -68,7 +68,7 @@ void doCircle()
|
||||
unsigned ledCnt = 50;
|
||||
std::vector<ColorRgb> data(ledCnt, ColorRgb::BLACK);
|
||||
|
||||
LedDeviceWs2801 ledDevice("/dev/spidev0.0", 40000);
|
||||
LedDeviceWs2801 ledDevice("/dev/spidev0.0", 40000, 500000);
|
||||
ledDevice.open();
|
||||
|
||||
timespec loopTime;
|
||||
|
@ -5,7 +5,7 @@ include_directories(${BCM_INCLUDE_DIRS})
|
||||
|
||||
# Configure the use of QT4
|
||||
#find_package(Qt4 COMPONENTS QtTest REQUIRED QUIET)
|
||||
include(${QT_USE_FILE})
|
||||
#include(${QT_USE_FILE})
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
link_directories(${CMAKE_FIND_ROOT_PATH}/lib/arm-linux-gnueabihf)
|
||||
|
||||
|
@ -143,7 +143,7 @@ void setup_io()
|
||||
);
|
||||
|
||||
if ((long)gpio_map < 0) {
|
||||
printf("mmap error %d\n", (int)gpio_map);
|
||||
printf("mmap error %d\n", (long)gpio_map);
|
||||
exit (-1);
|
||||
}
|
||||
gpio = (volatile unsigned *)gpio_map;
|
||||
@ -169,7 +169,7 @@ void setup_io()
|
||||
printf("SPI mapped from 0x%p to 0x%p\n",SPI0_BASE,spi0_map);
|
||||
|
||||
if ((long)spi0_map < 0) {
|
||||
printf("mmap error %d\n", (int)spi0_map);
|
||||
printf("mmap error %d\n", (long)spi0_map);
|
||||
exit (-1);
|
||||
}
|
||||
spi0 = (volatile unsigned *)spi0_map;
|
||||
|
Loading…
Reference in New Issue
Block a user