Public Access
Refresh effect per page
Pages choose their own refresh effect (or the Hardware setting), used when the page appears and for its own changes. Schedule blocks that switch instantly and rules still switch instantly. The ESP32 sends page effects to the Nano with a new no-save flag (E ...,2), so page switches don't wear the Nano's EEPROM. Page format 7 (version 6 pages are converted). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a6b946e17c
commit
a904615c51
29 files changed
+152
-17
No files matched your search
@@ -445,10 +445,26 @@ void test_effect_is_applied_and_stored()
|
||||
send("E0,1500,0\n");
|
||||
}
|
||||
|
||||
// A page's own effect: used, but the stored one stays (no EEPROM write per page change)
|
||||
void test_effect_without_saving()
|
||||
{
|
||||
send("E1,2500,1\n");
|
||||
send("E5,1000,3\n");
|
||||
TEST_ASSERT_EQUAL(5, display.last("effect")->a);
|
||||
TEST_ASSERT_EQUAL(1000, display.last("effect")->b);
|
||||
TEST_ASSERT_EQUAL(EFFECT_FLAG_SMALL_ONLY, display.last("effect")->c);
|
||||
TEST_ASSERT_FALSE(replied("ERR"));
|
||||
display.calls.clear();
|
||||
setup();
|
||||
TEST_ASSERT_EQUAL(EFFECT_SPARKLE, display.last("effect")->a);
|
||||
TEST_ASSERT_EQUAL(2500, display.last("effect")->b);
|
||||
send("E0,1500,0\n");
|
||||
}
|
||||
|
||||
void test_invalid_effect_is_rejected()
|
||||
{
|
||||
send("E10,1500\n"); // unknown effect
|
||||
send("E1,1500,2\n"); // unknown flag
|
||||
send("E1,1500,4\n"); // unknown flag
|
||||
send("E1,50\n"); // too fast
|
||||
send("E1\n"); // no duration
|
||||
TEST_ASSERT_EQUAL(0, display.count("effect"));
|
||||
@@ -716,6 +732,7 @@ int main()
|
||||
RUN_TEST(test_pulses_are_applied_and_stored);
|
||||
RUN_TEST(test_pulses_out_of_range_are_rejected);
|
||||
RUN_TEST(test_effect_is_applied_and_stored);
|
||||
RUN_TEST(test_effect_without_saving);
|
||||
RUN_TEST(test_invalid_effect_is_rejected);
|
||||
RUN_TEST(test_every_effect_visits_each_dot_once);
|
||||
RUN_TEST(test_wipe_goes_left_to_right_and_center_starts_in_the_middle);
|
||||
|
||||
Reference in new issue
Block a user