minor fixes and cleanups
fixed rgb_waving to correct LED count. change some LED program defaults.
This commit is contained in:
parent
3d0a13dead
commit
4db0f9e343
|
@ -159,9 +159,5 @@
|
|||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="build_softi2c">
|
||||
<resource resourceType="PROJECT" workspacePath="/nametag8_CH592"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
</cproject>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-83964059827239915" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="498546753104804359" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
|
|
@ -290,7 +290,7 @@ void rgb_waving(uint8_t *a, uint16_t tick)
|
|||
uint8_t desatfade = a[1] & 0x20;
|
||||
|
||||
rgb_waving_divider++;
|
||||
rgb_waving_divider %= 10;
|
||||
rgb_waving_divider %= RGBLED_COUNT;
|
||||
if (!rgb_waving_divider && (a[1] & 0x02)) {
|
||||
for (i = 0; i < RGBLED_COUNT; i++) {
|
||||
if (hsv_out[i].v <= trailfade) {
|
||||
|
@ -342,16 +342,16 @@ void rgb_waving(uint8_t *a, uint16_t tick)
|
|||
break;
|
||||
}
|
||||
case 1: { // moving down
|
||||
hsv_out[rgb_map[ a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[ a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[ a[6]]].v = uconf.favcolor_val;
|
||||
hsv_out[rgb_map[ a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[ a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[ a[6]]].v = uconf.favcolor_val;
|
||||
|
||||
hsv_out[rgb_map[9 - a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[9 - a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[9 - a[6]]].v = uconf.favcolor_val;
|
||||
hsv_out[rgb_map[RGBLED_COUNT - 1 - a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[RGBLED_COUNT - 1 - a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[RGBLED_COUNT - 1 - a[6]]].v = uconf.favcolor_val;
|
||||
|
||||
a[6]++;
|
||||
if (a[6] >= 5) {
|
||||
if (a[6] >= (RGBLED_COUNT >> 1) - 1) {
|
||||
a[5] = stall;
|
||||
a[4]++;
|
||||
break;
|
||||
|
@ -360,16 +360,16 @@ void rgb_waving(uint8_t *a, uint16_t tick)
|
|||
break;
|
||||
}
|
||||
case 3: { // moving up
|
||||
hsv_out[rgb_map[4 - a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[4 - a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[4 - a[6]]].v = uconf.favcolor_val;
|
||||
hsv_out[rgb_map[(RGBLED_COUNT >> 1) + 0 - a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[(RGBLED_COUNT >> 1) + 0 - a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[(RGBLED_COUNT >> 1) + 0 - a[6]]].v = uconf.favcolor_val;
|
||||
|
||||
hsv_out[rgb_map[5 + a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[5 + a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[5 + a[6]]].v = uconf.favcolor_val;
|
||||
hsv_out[rgb_map[(RGBLED_COUNT >> 1) + 1 + a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[(RGBLED_COUNT >> 1) + 1 + a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[(RGBLED_COUNT >> 1) + 1 + a[6]]].v = uconf.favcolor_val;
|
||||
|
||||
a[6]++;
|
||||
if (a[6] >= 5) {
|
||||
if (a[6] >= (RGBLED_COUNT >> 1) - 1) {
|
||||
a[5] = stall;
|
||||
a[4]++;
|
||||
break;
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
*
|
||||
* todo:
|
||||
* - decouple oled render routine from interrupt off time. not an issue for now...
|
||||
* - shrink main tick interrupt routine to incrementing a flag
|
||||
* - implement better CPU usage statistics
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -60,7 +58,7 @@
|
|||
|
||||
#define PROG_TICK_RATE ((32768-8192-4096) / 256) // not sure why this value can't be 32768/256
|
||||
// this was checked with a stopwatch and is close enough
|
||||
// this value IS FRAMERATE DEPENDENT... todo: fix this and make this accurate
|
||||
// this value IS FRAMERATE DEPENDENT for some reason... figure it out later
|
||||
#define IDLE_SLEEP_START (1 << 0)
|
||||
#define IDLE_MENU_START (1 << 1)
|
||||
#define IDLE_DIM_START (1 << 2)
|
||||
|
@ -70,7 +68,7 @@
|
|||
|
||||
|
||||
|
||||
const uint8_t vers[] = "241109a";
|
||||
const uint8_t vers[] = "241116a";
|
||||
|
||||
uint32_t cpu_use = 0;
|
||||
uint32_t cpu_max = 0;
|
||||
|
|
|
@ -22,8 +22,8 @@ uint16_t uconf_flash_offset;
|
|||
|
||||
static const uint8_t uconf_edge_defaults[8][8] = {
|
||||
{0x03, 0x10, 0x04, 0x00, 0x00, 0x00, 0xff, 0xa0}, // solid color
|
||||
{0x03, 0x10, 0x04, 0x00, 0x00, 0x00, 0xff, 0xa0}, // flicker
|
||||
{0x15, 0x42, 0x50, 0x00, 0xa0, 0x30, 0xff, 0x20}, // circles
|
||||
{0x03, 0x1f, 0x04, 0x00, 0x00, 0x00, 0xff, 0xa0}, // flicker
|
||||
{0x15, 0x42, 0x0b, 0x00, 0xa0, 0x30, 0xff, 0x20}, // circles
|
||||
{0x03, 0x10, 0x04, 0x00, 0x00, 0x00, 0xff, 0xa0}, // waving
|
||||
{0x03, 0x11, 0x05, 0x00, 0x00, 0x00, 0xff, 0x80}, // rainbow
|
||||
{0x00, 0x01, 0x01, 0x00, 0x00, 0x66, 0x46, 0x80}, // cop mode
|
||||
|
|
Loading…
Reference in New Issue