@@ -180,31 +180,52 @@ void ColorSelect::onLongClickM()
180180
181181void ColorSelect::showSlotSelection ()
182182{
183- uint8_t exitIndex = m_colorset.numColors ();
184- uint32_t holdDur = g_pButtonM->holdDuration ();
185- bool withinNumColors = m_curSelection < exitIndex;
186- bool holdDurationCheck = g_pButtonM->isPressed () && holdDur >= DELETE_THRESHOLD_TICKS ;
187- bool holdDurationModCheck = (holdDur % (DELETE_CYCLE_TICKS * 2 )) > DELETE_CYCLE_TICKS ;
188- const RGBColor &col = m_colorset[m_curSelection];
189- if (withinNumColors && holdDurationCheck && holdDurationModCheck) {
190- // breath red for delete slot
191- Leds::breatheIndex (LED_ALL , 0 , holdDur);
192- } else if (withinNumColors) {
193- if (col.empty ()) {
194- Leds::setAll (RGB_WHITE0 );
195- }
196- // blink the selected slot color
197- Leds::blinkAll (150 , 650 , col);
198- } else if (exitIndex < MAX_COLOR_SLOTS ) {
199- if (m_curSelection == exitIndex) {
200- // blink both leds and blink faster to indicate 'add' new color
201- Leds::blinkAll (100 , 150 , RGB_WHITE2 );
183+ // Render the colors on radial indices 0-7
184+ for (uint8_t i = 0 ; i < 8 ; ++i) {
185+ RGBColor col;
186+ if (m_colorset.numColors () <= i) {
187+ Leds::setMap (MAP_RADIAL_INNER (i), RGB_WHITE0 );
188+ // Leds::blinkMap(MAP_RADIAL(i + 8));
189+ } else {
190+ Leds::setMap (MAP_RADIAL_OUTER (i), m_colorset.get (i));
191+ Leds::setMap (MAP_RADIAL_INNER (i), RGB_WHITE2 );
202192 }
203- exitIndex++;
204- }
205- if (m_curSelection == exitIndex) {
206- showFullSet (50 , 100 );
207193 }
194+
195+ // Radial index 8: Exit
196+ Leds::setMap (MAP_RADIAL_INNER (8 ), RGB_WHITE1 );
197+ Leds::setMap (MAP_RADIAL_OUTER (8 ), RGB_RED3 );
198+
199+ // Leds::setMap(MAP_RADIAL_INNER(7), HSVColor(Time::getCurtime() / 10, 255, 255));
200+ // Leds::setMap(MAP_RADIAL_OUTER(7), RGB_WHITE4);
201+ // Leds::blinkMap(MAP_RADIAL(6));
202+
203+
204+ // uint8_t exitIndex = m_colorset.numColors();
205+ // uint32_t holdDur = g_pButtonM->holdDuration();
206+ // bool withinNumColors = m_curSelection < exitIndex;
207+ // bool holdDurationCheck = g_pButtonM->isPressed() && holdDur >= DELETE_THRESHOLD_TICKS;
208+ // bool holdDurationModCheck = (holdDur % (DELETE_CYCLE_TICKS * 2)) > DELETE_CYCLE_TICKS;
209+ // const RGBColor &col = m_colorset[m_curSelection];
210+ // if (withinNumColors && holdDurationCheck && holdDurationModCheck) {
211+ // // breath red for delete slot
212+ // Leds::breatheIndex(LED_ALL, 0, holdDur);
213+ // } else if (withinNumColors) {
214+ // if (col.empty()) {
215+ // Leds::setAll(RGB_WHITE0);
216+ // }
217+ // // blink the selected slot color
218+ // Leds::blinkAll(150, 650, col);
219+ // } else if (exitIndex < MAX_COLOR_SLOTS) {
220+ // if (m_curSelection == exitIndex) {
221+ // // blink both leds and blink faster to indicate 'add' new color
222+ // Leds::blinkAll(100, 150, RGB_WHITE2);
223+ // }
224+ // exitIndex++;
225+ // }
226+ // if (m_curSelection == exitIndex) {
227+ // showFullSet(50, 100);
228+ // }
208229}
209230
210231void ColorSelect::showSelection (ColorSelectState mode)
0 commit comments