Skip to content

Commit

Permalink
add light indication of stepped modulator
Browse files Browse the repository at this point in the history
  • Loading branch information
trentgill committed Jul 6, 2024
1 parent 442e117 commit 3bef2d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/stepped.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ void stepped(float _steps, int _reset, int _twoup, int _down){
}
}

int stepped_ix(void){
return current_step;
}

int stepped_get(void){
// perform scaling
return vsteps[current_step];
Expand Down
1 change: 1 addition & 0 deletions lib/stepped.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ void stepped_init(void);
void stepped(float _steps, int _reset, int _twoup, int _down);

int stepped_get(void);
int stepped_ix(void);
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ int main(void){
int a = ADC_get(4); // raw 0~4095 value
a *= 12; // scale up to 12*4096
a >>= 12; // divide by 4096
lights_xset(a);
lights_xset(stepped_ix());
// Caw_printf("%i\n\r",a);
}
for(int i=0; i<6; i++){
Expand Down

0 comments on commit 3bef2d0

Please sign in to comment.