diff --git a/UI/index.html b/UI/index.html index fc8be40..5171bae 100644 --- a/UI/index.html +++ b/UI/index.html @@ -77,7 +77,7 @@
RPM Sweep speed:
- +
diff --git a/ardustim/ardustim/ardustim.h b/ardustim/ardustim/ardustim.h index e9a7608..78d03b8 100644 --- a/ardustim/ardustim/ardustim.h +++ b/ardustim/ardustim/ardustim.h @@ -22,14 +22,12 @@ #define __ARDUSTIM_H__ #include -#include "structures.h" #include /* Structures */ /* Prototypes */ int check_and_adjust_tcnt_limits(uint32_t *, uint32_t *); -sweep_step * build_sweep_steps(uint32_t *, uint32_t *, uint8_t *); void reset_new_OCR1A(uint32_t); uint8_t get_bitshift_from_prescaler(uint8_t *); void get_prescaler_bits(uint32_t *, uint8_t *, uint8_t *); diff --git a/ardustim/ardustim/ardustim.ino b/ardustim/ardustim/ardustim.ino index e2ad1b1..a4b8a41 100644 --- a/ardustim/ardustim/ardustim.ino +++ b/ardustim/ardustim/ardustim.ino @@ -252,8 +252,6 @@ ISR(ADC_vect){ /* Pumps the pattern out of flash to the port * The rate at which this runs is dependent on what OCR1A is set to - * the sweeper in timer2 alters this on the fly to alow changing of RPM - * in a very nice way */ ISR(TIMER1_COMPA_vect) { /* This is VERY simple, just walk the array and wrap when we hit the limit */ diff --git a/ardustim/ardustim/comms.cpp b/ardustim/ardustim/comms.cpp index 536cf85..11a2f26 100644 --- a/ardustim/ardustim/comms.cpp +++ b/ardustim/ardustim/comms.cpp @@ -23,7 +23,6 @@ #include "ardustim.h" #include "enums.h" #include "comms.h" -#include "structures.h" #include "storage.h" #include "wheel_defs.h" #include @@ -85,6 +84,7 @@ void commandParser() break; case 'C': //Send the current config + sizeof(config); break; @@ -123,7 +123,7 @@ void commandParser() case 'P': //Send the pattern for the current wheel numTeeth = pgm_read_word(Wheels[selected_wheel].wheel_max_edges); - //PROGMEM_readAnything (&table[i], thisOne); + for(uint16_t x=0; x - -/* Structures */ -typedef struct _sweep_step sweep_step; -struct _sweep_step { - uint16_t beginning_ocr; - uint16_t ending_ocr; - uint8_t prescaler_bits; - uint32_t remainder_per_isr; - uint16_t tcnt_per_isr; -}; - -/* Tie things wheel related into one nicer structure ... */ -typedef struct _wheels wheels; -struct _wheels { - const char *decoder_name PROGMEM; - const unsigned char *edge_states_ptr PROGMEM; - const float rpm_scaler; - //const uint16_t rpm_scaler; - const uint16_t wheel_max_edges; - const uint16_t wheel_degrees; -}; - -template void PROGMEM_readAnything (const T * sce, T& dest) - { - memcpy_P (&dest, sce, sizeof (T)); - } - -template T PROGMEM_getAnything (const T * sce) - { - static T temp; - memcpy_P (&temp, sce, sizeof (T)); - return temp; - } - -#endif