Skip to content

Commit

Permalink
Apply standard code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiegle committed Jun 19, 2024
1 parent 1d12780 commit d993096
Show file tree
Hide file tree
Showing 72 changed files with 24,052 additions and 17,068 deletions.
531 changes: 251 additions & 280 deletions Source/Basestations/OneBox.cpp

Large diffs are not rendered by default.

111 changes: 54 additions & 57 deletions Source/Basestations/OneBox.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
/*
------------------------------------------------------------------
------------------------------------------------------------------
This file is part of the Open Ephys GUI
Copyright (C) 2021 Allen Institute for Brain Science and Open Ephys
This file is part of the Open Ephys GUI
Copyright (C) 2024 Open Ephys
------------------------------------------------------------------
------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

Expand All @@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#include "../NeuropixComponents.h"

# define SAMPLECOUNT 64
#define SAMPLECOUNT 64

class OneBoxADC;
class OneBoxDAC;
Expand All @@ -38,66 +38,63 @@ class OneBox : public Basestation

{
public:
/** Constructor */
OneBox (NeuropixThread*, int ID);

/** Constructor */
OneBox(NeuropixThread*, int ID);
/** Destructor */
~OneBox();

/** Destructor */
~OneBox();
/** Opens connection to OneBox */
bool open() override;

/** Opens connection to OneBox */
bool open() override;
/** Closes connection to OneBox */
void close() override;

/** Closes connection to OneBox */
void close() override;
/** Initializes in a separate thread*/
void initialize (bool signalChainIsLoading) override;

/** Initializes in a separate thread*/
void initialize(bool signalChainIsLoading) override;
/** Returns the total number of connected probes */
int getProbeCount() override;

/** Returns the total number of connected probes */
int getProbeCount() override;
/** Gets info about this device */
void getInfo() override;

/** Gets info about this device */
void getInfo() override;
/** Sets the SMA port to input mode */
void setSyncAsInput() override;

/** Sets the SMA port to input mode */
void setSyncAsInput() override;
/** Sets the SMA port to output mode */
void setSyncAsOutput (int freqIndex) override;

/** Sets the SMA port to output mode */
void setSyncAsOutput(int freqIndex) override;
/** Sets the OneBox as passive input (does nothing) */
void setSyncAsPassive() override;

/** Sets the OneBox as passive input (does nothing) */
void setSyncAsPassive() override;
/** Returns the available sync frequencies*/
Array<int> getSyncFrequencies() override;

/** Returns the available sync frequencies*/
Array<int> getSyncFrequencies() override;
/** Starts acquisition on all probes */
void startAcquisition() override;

/** Starts acquisition on all probes */
void startAcquisition() override;
/** Stops acquisition on all probes */
void stopAcquisition() override;

/** Stops acquisition on all probes */
void stopAcquisition() override;
/** Gets fill percentage of OneBox FIFO buffer */
float getFillPercentage() override;

/** Gets fill percentage of OneBox FIFO buffer */
float getFillPercentage() override;
/** Returns any non-probe data sources (e.g. ADCs)*/
Array<DataSource*> getAdditionalDataSources() override;

/** Returns any non-probe data sources (e.g. ADCs)*/
Array<DataSource*> getAdditionalDataSources() override;
/** Triggers the Waveplayer output */
void triggerWaveplayer (bool shouldStart);

/** Triggers the Waveplayer output */
void triggerWaveplayer(bool shouldStart);
Neuropixels::NP_ErrorCode errorCode;

Neuropixels::NP_ErrorCode errorCode;
static Array<int> existing_oneboxes;
int original_slot_number;

static Array<int> existing_oneboxes;
int original_slot_number;

const int first_available_slot = 16;

ScopedPointer<OneBoxADC> adcSource;
ScopedPointer<OneBoxDAC> dacSource;
const int first_available_slot = 16;

ScopedPointer<OneBoxADC> adcSource;
ScopedPointer<OneBoxDAC> dacSource;
};


#endif // __ONEBOX_H_2C4C2D67__
#endif // __ONEBOX_H_2C4C2D67__
28 changes: 14 additions & 14 deletions Source/Basestations/PxiBasestation.cpp
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
/*
------------------------------------------------------------------
------------------------------------------------------------------
This file is part of the Open Ephys GUI
Copyright (C) 2018 Allen Institute for Brain Science and Open Ephys
This file is part of the Open Ephys GUI
Copyright (C) 2024 Open Ephys
------------------------------------------------------------------
------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

Expand Down
Loading

0 comments on commit d993096

Please sign in to comment.