Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8cc4ebea74 | |||
| 81b99ce4b1 |
+1
-1
@@ -19,7 +19,7 @@
|
||||
</property>
|
||||
<property Type="choicelist" Value="1" id="Debug Probe Selection">
|
||||
<choice Name="Select by serial number" value="0">
|
||||
<property Type="stringfield" Value="L1000537" id="-- Enter the serial number"/>
|
||||
<property Type="stringfield" Value="L1000628" id="-- Enter the serial number"/>
|
||||
</choice>
|
||||
</property>
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
|
||||
+5
-4
@@ -79,7 +79,7 @@ static void headstage_neu_append_notify_data() {
|
||||
borshin_b = CaliTable.Ch[channel].Offset[ rec_register_value[REC_CHANNEL_INDEX] ];
|
||||
borshin_real = borshin_raw * borshin_a + borshin_b; // range from [ FFF , 000 ]
|
||||
borshin_sample_rate = 2000000/10/rec_register_value[REC_ADC_CLOCK_INDEX];
|
||||
CLP(borshin_real); // This function input is 12-bit value
|
||||
CLP( borshin_raw ); // This function input is 12-bit value
|
||||
// the function will buffer 16-point then
|
||||
// perform 16-point FFT.
|
||||
// Afterwards, calculate sum of PSD then
|
||||
@@ -269,7 +269,8 @@ static void CLP(uint16_t unsigned_real_data){
|
||||
static int count_data;
|
||||
int abs_tmp;
|
||||
static int present, past1, past2, hvs;
|
||||
static int w[6] = {1597,-1909,1856,-1190,630,23};
|
||||
// static int w[6] = {1597,-1909,1856,-1190,630,23};
|
||||
static int w[6] = { 1, -2, 2, -1, 1, 0};
|
||||
|
||||
count_sample++; // count+1 every 1-ms
|
||||
if (count_sample>=24){ // ensure sample LFP data every 24-ms(41.6667Hz)
|
||||
@@ -287,7 +288,7 @@ static void CLP(uint16_t unsigned_real_data){
|
||||
+ w[2] * real[i-3] \
|
||||
+ w[3] * real[i-4] \
|
||||
+ w[4] * real[i-5] \
|
||||
+ w[5] * real[i-6] )>>10;
|
||||
+ w[5] * real[i-6] );
|
||||
imag[i] = 0;
|
||||
}
|
||||
BitReverse( real, numFFT);
|
||||
@@ -300,7 +301,7 @@ static void CLP(uint16_t unsigned_real_data){
|
||||
imag[i-1] = 0;
|
||||
x_in[i-1] = x_in[i];
|
||||
}
|
||||
present = ( (accumu_sum>>12) > 45000 )?1:0;
|
||||
present = ( (accumu_sum) > 11500000 )?1:0;
|
||||
if (present+past1+past2==3)
|
||||
hvs = 1;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user