louisthomaspro / ledwallapp Goto Github PK
View Code? Open in Web Editor NEWWeb application deployed on any Linux to control the Polytech' Tours LedWall. Developped with expressjs & Angular 7
License: MIT License
Web application deployed on any Linux to control the Polytech' Tours LedWall. Developped with expressjs & Angular 7
License: MIT License
To Optimize the color correction algorithm on the BeagleBone Back, You should just use the integrated PRU function. Just send the balance value using pru_msg_fd. In the ledwall.c file
void applyColorCorrection(uint32_t balance)
{
#ifdef RASPBERRY
for (uint8_t x = 0; x < LED_WALL_WIDTH; x++)
{
for (uint8_t y = 0; y < LED_WALL_HEIGHT; y++)
{
FrameBuffer[y][x].red = FrameBuffer[y][x].red * ((balance >> 16) & 0xFF) / 0xFF;
FrameBuffer[y][x].green = FrameBuffer[y][x].green * ((balance >> 8) & 0xFF) / 0xFF;
FrameBuffer[y][x].blue = FrameBuffer[y][x].blue * (balance & 0xFF) / 0xFF;
}
}
#elif defined BEAGLE
dprintf(pru_rpmsg_fd, "-2 %06X\n",balance);
#endif
}
The return code in case of readframe fail are different, great.
But the error messages should be different in case of fopen error and number of byte error.
{
int numberLedRead;
Lwfb = fopen(LWFB_Path, "r");
if(!Lwfb)
{
//perror("Could not open the framebuffer file for reading !\n");
printf("ERROR failed fopen %s : %s\n",LWFB_Path, strerror(errno));
return 1;
}
numberLedRead = fread(&FrameBuffer, sizeof(Led), LED_WALL_HEIGHT*LED_WALL_WIDTH, Lwfb);
if(numberLedRead != LED_WALL_HEIGHT*LED_WALL_WIDTH)
{
//perror("Did not read the right number of bytes !\n");
printf("ERROR did not read %d byte instead %d: %s\n", LED_WALL_HEIGHT*LED_WALL_WIDTH,numberLedRead, strerror(errno));
return 2;
}
fclose(Lwfb);
return 0;
}```
The middleware should exit if the init procedure fails !
Allows Systemd to restart the Middleware if it fails loading.
You should change the behavior in the main function
int main()
{
int ret;
if(initEvent()!=0)
return 1;
//This is where you have to check for the error
if(init_ledwall() != WS2811_SUCCESS){
return 2;
}
... Rest of the main code
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.