Skip to content

Commit

Permalink
Cleanup unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
noisymime committed Apr 19, 2024
1 parent 25e01c5 commit fe6238d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 67 deletions.
2 changes: 1 addition & 1 deletion UI/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<div class="row">
<div class="col-5">RPM Sweep speed: </div>
<div class="col-2">
<input type="range" id="rpmSweepSpeed" min="100" max="8000" step="10" value="5000" onChange="setSweepRPM()" disabled>
<input type="range" id="rpmSweepSpeed" min="200" max="4000" step="10" value="3000" onChange="setSweepRPM()" disabled>
</div>
</div>
<div>
Expand Down
2 changes: 0 additions & 2 deletions ardustim/ardustim/ardustim.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@
#define __ARDUSTIM_H__

#include <stdint.h>
#include "structures.h"
#include <Arduino.h>

/* 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 *);
Expand Down
2 changes: 0 additions & 2 deletions ardustim/ardustim/ardustim.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions ardustim/ardustim/comms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "ardustim.h"
#include "enums.h"
#include "comms.h"
#include "structures.h"
#include "storage.h"
#include "wheel_defs.h"
#include <avr/pgmspace.h>
Expand Down Expand Up @@ -85,6 +84,7 @@ void commandParser()
break;

case 'C': //Send the current config
sizeof(config);

break;

Expand Down Expand Up @@ -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<Wheels[selected_wheel].wheel_max_edges; x++)
{
if(x != 0) { Serial.print(","); }
Expand Down
11 changes: 11 additions & 0 deletions ardustim/ardustim/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,15 @@ struct configTable {
};
extern struct configTable config;

/* 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;
};

#endif
60 changes: 0 additions & 60 deletions ardustim/ardustim/structures.h

This file was deleted.

0 comments on commit fe6238d

Please sign in to comment.