Skip to content

Commit

Permalink
Squash overflow bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammy1Am committed May 27, 2018
1 parent b7610e7 commit 8a48314
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Arduino/Moppy/MoppyConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

// Device address for this Arduino (only messages sent to this address
// will be processed.
#define DEVICE_ADDRESS 0x01
#define DEVICE_ADDRESS 0x02

// Minimum and maximum sub-addresses that messages will be processed for.
// E.g. if you have 8 drives this would be 1 and 8. If you have 16, 1 and 16.
#define MIN_SUB_ADDRESS 1
#define MAX_SUB_ADDRESS 8
#define MAX_SUB_ADDRESS 1


#endif /* SRC_MOPPYCONFIG_H_ */
8 changes: 6 additions & 2 deletions Arduino/Moppy/MoppyCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@
*/

// Floppy drives directly connected to the Arduino's digital pins
#include "src/MoppyInstruments/FloppyDrives.h"
FloppyDrives instrument = FloppyDrives();
//#include "src/MoppyInstruments/FloppyDrives.h"
//FloppyDrives instrument = FloppyDrives();


//Uncomment the 2 next lines and comment the 2 lines above this comment to switch to L298N mode
//#include "src/MoppyInstruments/L298N.h"
//L298N instrument = L298N(); // please see src/MoppyInstruments/L298N.h for pinout and additionnal info


// A single device (e.g. xylophone, drums, etc.) connected to shift registers
#include "src/MoppyInstruments/ShiftRegister.h"
ShiftRegister instrument = ShiftRegister();

/**********
* MoppyNetwork classes receive messages sent by the Controller application,
* parse them, and use the data to call the appropriate handler as implemented
Expand Down
4 changes: 2 additions & 2 deletions Arduino/Moppy/src/MoppyInstruments/ShiftRegister.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
// First and last supported notes (any notes outside this range will be ignored, first note will be
// indexed as zero for shifting
#define NUM_NOTES 24
const uint8_t FIRST_NOTE = 48;
const uint8_t LAST_NOTE = FIRST_NOTE + NUM_NOTES;
const uint8_t FIRST_NOTE = 79;
const uint8_t LAST_NOTE = FIRST_NOTE + (NUM_NOTES-1);

#define SHIFT_TIMER_RESOLUTION 1000 //Microsecond resolution for starting and ending notes

Expand Down

0 comments on commit 8a48314

Please sign in to comment.