Skip to content

Commit

Permalink
fix minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak031 committed Jul 2, 2024
1 parent 822c88a commit a1beff3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/board_controller/brainalive/brainalive.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#include <string>

#include "brainalive.h"
#include "custom_cast.h"
#include "get_dll_dir.h"
#include "timestamp.h"
#include <string.h>


// info about services and chars
#define START_BYTE 0x0A
#define STOP_BYTE 0x0D
#define BRAINALIVE_HANDSHAKING_PACKET_SIZE 6

static int software_gain, hardware_gain, reffrence_volatage;

#define BRAINALIVE_WRITE_CHAR "0000fe41-8e22-4541-9d4c-21edae82ed19"
Expand All @@ -31,7 +32,9 @@ static void brainalive_read_notifications (simpleble_uuid_t service,
reffrence_volatage = (data[3] << 8) | data[4];
}
else
{
((BrainAlive *)(board))->read_data (service, characteristic, data, size, 0);
}
}

BrainAlive::BrainAlive (struct BrainFlowInputParams params)
Expand Down Expand Up @@ -304,7 +307,6 @@ int BrainAlive::config_board (std::string config)
return (int)BrainFlowExitCodes::BOARD_NOT_CREATED_ERROR;
}
uint8_t command[5];
size_t len = config.size ();
command[0] = 0x0a;
command[1] = 0x81; // it is hardcoded for now only
command[2] = 0x00;
Expand Down
1 change: 1 addition & 0 deletions src/board_controller/brainalive/inc/brainalive.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class BrainAlive : public BLELibBoard
static constexpr int FSR_Value = 8388607;
static constexpr int ba_brainflow_package_size = 17;


protected:
volatile simpleble_adapter_t brainalive_adapter;
volatile simpleble_peripheral_t brainalive_peripheral;
Expand Down

0 comments on commit a1beff3

Please sign in to comment.