Added 'color2' alias to 'sync'. Quick color set with brightness
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Dmitry Isaenko 2025-02-03 23:49:52 +03:00
parent c990922489
commit 8ce71e4701
4 changed files with 15 additions and 13 deletions

View file

@ -5,6 +5,9 @@
Reference hardware used: Z890 AORUS PRO ICE, 048d:5711 Integrated Technology Express, Inc. GIGABYTE Device
Information regarding other motherboards:
* *[X870 AORUS ELITE WIFI7](https://github.com/developersu/argbColors/issues/2)*
### udev rules
To make application work once started by user, and not only from root:
@ -21,7 +24,7 @@ See SPECIFICATION.md
### License
[![GNU GPLv3 Image](https://www.gnu.org/graphics/gplv3-127x51.png)](https://www.gnu.org/licenses/gpl-3.0.en.html)
argbColors is a free software licensed under GPL v3.0 It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. [GNU General Public License](https://www.gnu.org/licenses/gpl.html) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
argbColors is a free software licensed under GPL v3.0 It is distributed in the hope that it will be useful, but **WITHOUT ANY WARRANTY**. [GNU General Public License](https://www.gnu.org/licenses/gpl.html) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This application is in no way affiliated with GIGABYTE, Integrated Technology Express or any of its partners

Binary file not shown.

View file

@ -21,7 +21,7 @@
#include "iousb.c"
enum synchronized_commands { SYNC_COLOR, SYNC_WAVE, SYNC_WAVE2, SYNC_OFF,
SPEC_IMPULSE, SPEC_FLASH, SPEC_FLASH2, SPEC_CYCLE }
SPEC_IMPULSE, SPEC_FLASH, SPEC_FLASH2, SPEC_CYCLE, SPEC_COLOR}
synchronized_commands;
struct separate_c{
@ -85,9 +85,11 @@ int prepare_sync(char* command){
sync_cmd = SPEC_FLASH2;
else if (strcmp(command, "cycle") == 0)
sync_cmd = SPEC_CYCLE;
else if (strcmp(command, "color2") == 0)
sync_cmd = SPEC_COLOR;
else{
printf("Invalid command \"%s\"\n"
"Allowed: color wave wave2 off. Plus aliases: impulse flash flash2 cycle\n", command);
"Allowed: color wave wave2 off. Plus aliases: impulse flash flash2 cycle color2\n", command);
return -1;
}
return 0;
@ -176,6 +178,11 @@ int sync_flow(unsigned int red, unsigned int green, unsigned int blue, unsigned
make_separate_command(&s, i, "cycle", red, green, blue, brightness, intensity);
}
return runStaticCommand(s);
case SPEC_COLOR:
for (int i = 1; i < 7; i++){
make_separate_command(&s, i, "color", red, green, blue, brightness, intensity);
}
return runStaticCommand(s);
default:
return -1;
}

View file

@ -199,14 +199,6 @@ int runStaticCommand(separate_commands_set c_set){
counter = 0;
limit = 7;
#ifdef DEBUG
print_array(c_set.dir1, 64);
print_array(c_set.dir2, 64);
print_array(c_set.dir3, 64);
print_array(c_set.dir4, 64);
print_array(c_set.dir5, 64);
print_array(c_set.dir6, 64);
#endif
if(64 != writeUsb(c_set.dir1))
return 1;