Skip to content

Commit

Permalink
debugging changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoOhR committed Sep 6, 2024
1 parent 5a45478 commit 0ab65c1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Application/DataLogger/DataLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ void DataLogger::Standby::Compute(DataLogger& context) {
if (!context.storage_connected_observer_) {
context.SetState(&context.idle_state_);
}

if (context.user_input_->ToggleDetected()) {
context.logging_enabled_ = context.user_input_->Read();

if (context.logging_enabled_) {
context.SetState(&context.logging_state_);
}
}
context.SetState(&context.logging_state_);
}

void DataLogger::Standby::Exit(DataLogger& context) {
Expand Down Expand Up @@ -144,7 +144,6 @@ void DataLogger::Logging::Compute(DataLogger& context) {
}
}


context.queue_.Lock();

DataPayload received_data;
Expand All @@ -154,6 +153,7 @@ void DataLogger::Logging::Compute(DataLogger& context) {
}

context.queue_.Unlock();

}

void DataLogger::Logging::Exit(DataLogger& context) {
Expand Down
1 change: 1 addition & 0 deletions Application/Mutex/imutex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class IMutex {
virtual void Lock() = 0;

virtual void Unlock() = 0;

};

} // namespace application
Expand Down
2 changes: 0 additions & 2 deletions Application/Mutex/mutex_cmsisv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,4 @@ void MutexCmsisV2::Unlock() {
osMutexRelease(mutex_id_);
}



} // namespace application
3 changes: 3 additions & 0 deletions Application/Relay/can_relay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace application{
}

void Can_Relay::Generate_Messages(application::DataPayload data){

transmission_ended_ = false;
float message_row[messageSize] = {0};
uint8_t row;
Expand All @@ -30,12 +31,14 @@ namespace application{
column = (i%2) * 4; //the column which the row goes into is essentially sinusoidal
bitSet(message_row[i], &message[row][column]);
}

}


void Can_Relay::Send_Messages(){
for(int i = 0; i < kRows; i++){
can_bus_->Transmit(message[i]);
//printf("Sending Message! \n");
}
}

Expand Down
1 change: 0 additions & 1 deletion Application/circular_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ class CircularQueue {

void Unlock() { mutex_->Unlock(); }


private:
void IncrementIndex(uint8_t &index) {
index = (index + 1) % kMaxSize;
Expand Down

0 comments on commit 0ab65c1

Please sign in to comment.