diff --git a/main.c b/main.c index 9ca271c..c9d6192 100644 --- a/main.c +++ b/main.c @@ -68,8 +68,7 @@ void core1_main(void) { while (1) { update_buttons(); update_inputs(); - //printf("vco_mode: %d, quant_enabled: %d amen_enabled: %d\n", state.vco_mode,state.quant_enabled,state.amen_enabled); - //printf("clock_bpm: %f\n",state.clock_bpm); + printf("Sample: %f\n", state.dbg_sample); sleep_ms(1); } } diff --git a/pwm.c b/pwm.c index a2d2b30..6ff5b81 100644 --- a/pwm.c +++ b/pwm.c @@ -1,8 +1,8 @@ #include #include -#include #include "const.h" +#include "state.h" #include "synth.h" #include "pwm.h" @@ -15,7 +15,7 @@ void pwm_isr(void) { pwm_clear_irq(slice); float sample = get_sample(); - printf("sample: %f\n", sample); + state.dbg_sample = sample; uint16_t level = (uint16_t)((sample + 1.0f) * 0.5f * 3400.0f); pwm_set_chan_level(slice, chan, level); diff --git a/state.h b/state.h index fda668f..8fcd6d0 100644 --- a/state.h +++ b/state.h @@ -23,6 +23,8 @@ typedef struct { vco_mode_t vco_mode; bool quant_enabled; bool amen_enabled; + + float dbg_sample; } state_t; extern state_t state;