Skip to content

Commit

Permalink
[TU] display clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmxmx committed Jun 7, 2017
1 parent 1436fcd commit de8281c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
12 changes: 6 additions & 6 deletions soft/t_u_REV/APP_CLK.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2676,16 +2676,16 @@ void CLOCKS_menu() {
for (int i = 0, x = 0; i < NUM_CHANNELS; ++i, x += 21) {

const Clock_channel &channel = clock_channel[i];
int_clock_used_ = channel.get_clock_source() == CHANNEL_TRIGGER_INTERNAL ? 0x1 : 0x0;
menu::SixTitleBar::SetColumn(i);
graphics.print((char)('1' + i));
graphics.movePrintPos(2, 0);
//
uint16_t internal_ = channel.get_clock_source() == CHANNEL_TRIGGER_INTERNAL ? 0x10 : 0x00;
int_clock_used_ += internal_;
menu::SixTitleBar::DrawGateIndicator(i, internal_);

if (channel.get_mode4() != DAC && channel.get_display_clock() == _ONBEAT)
graphics.drawBitmap8(x + 4, 2, 4, TU::bitmap_indicator_4x8);
if (int_clock_used_)
graphics.drawBitmap8(x + 17, 2, 4, TU::bitmap_indicator_4x8);
//
if (clocks_state.selected_channel == i && channel.get_mode4() != DAC && channel.get_page() != TEMPO && channel.get_display_clock() == _ONBEAT)
menu::SixTitleBar::DrawGateIndicator(i, 0x10);
// global division?
if (global_div_ && !i)
graphics.drawBitmap8(x, 2, 4, TU::bitmap_div_indicator_4x8);
Expand Down
10 changes: 4 additions & 6 deletions soft/t_u_REV/TU_apps.ino
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,13 @@ void draw_app_menu(const menu::ScreenCursor<5> &cursor) {
}

void draw_save_message(uint8_t c) {

GRAPHICS_BEGIN_FRAME(true);
graphics.movePrintPos(weegfx::Graphics::kFixedFontW, 0);
graphics.print("saving ");
for (int i = 0; i < c; i++)
graphics.print(".");
uint8_t _size = c % 120;
graphics.drawRect(63 - (_size >> 1), 31 - (_size >> 2), _size, _size >> 1);
GRAPHICS_END_FRAME();
}


void Ui::AppSettings() {

SetButtonIgnoreMask();
Expand Down Expand Up @@ -361,7 +359,7 @@ void Ui::AppSettings() {
save_app_data();
int cnt = 0x0;
while(idle_time() < SETTINGS_SAVE_TIMEOUT_MS)
draw_save_message((cnt++) >> 7);
draw_save_message((cnt++) >> 4);
}
}

Expand Down

0 comments on commit de8281c

Please sign in to comment.