Skip to content

Commit

Permalink
Compiling again. Adding gitignore for mac cruft.
Browse files Browse the repository at this point in the history
  • Loading branch information
kitschpatrol committed Jan 15, 2014
1 parent d47ae72 commit f066143
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.DS_Store
6 changes: 3 additions & 3 deletions Brain/Brain.cpp
Expand Up @@ -109,11 +109,11 @@ uint8_t Brain::update() {
//clearEegPower(); // Zeros the EEG power. Necessary if hasPower turns false... better off on the gettter end?
}

// Keep track of the last uint8_t so we can find the sync byte pairs.
// Keep track of the last byte so we can find the sync byte pairs.
lastByte = latestByte;
}

if(freshPacket) {
if (freshPacket) {
freshPacket = false;
return true;
}
Expand Down Expand Up @@ -150,7 +150,7 @@ uint8_t Brain::parsePacket() {
// Based on mindset_communications_protocol.pdf from the Neurosky Mindset SDK.
hasPower = false;
clearEegPower(); // clear the eeg power to make sure we're honest about missing values... null would be better than 0.
uint8_t return_byte = 0x0;
uint8_t return_byte = B00000000;

for (uint8_t i = 0; i < packetLength; i++) {
switch (packetData[i]) {
Expand Down
10 changes: 5 additions & 5 deletions Brain/Brain.h
@@ -1,6 +1,3 @@
// To do:
// Data simulator

#ifndef Brain_h
#define Brain_h

Expand All @@ -18,7 +15,7 @@ class Brain {
Brain(HardwareSerial &_brainSerial);

// Run this in the main loop.
boolean update();
uint8_t update();

// String with most recent error.
char* readErrors();
Expand All @@ -40,7 +37,8 @@ class Brain {
unsigned long readHighBeta();
unsigned long readLowGamma();
unsigned long readMidGamma();

int rawValue;

private:
HardwareSerial* brainSerial;
uint8_t packetData[MAX_PACKET_LENGTH];
Expand Down Expand Up @@ -82,6 +80,8 @@ class Brain {

boolean freshPacket;

// Lighter to just make this public, instead of using the getter?
unsigned long eegPower[EEG_POWER_BANDS];
};

#endif

0 comments on commit f066143

Please sign in to comment.