DSRemote/serial_decoder.cpp

95 wiersze
1.8 KiB
C++

/*
***************************************************************************
*
* Author: Teunis van Beelen
*
* Copyright (C) 2016 Teunis van Beelen
*
* Email: teuniz@gmail.com
*
***************************************************************************
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
***************************************************************************
*/
void UI_Mainwindow::serial_decoder(void)
{
// int i, j,
// threshold[MAX_CHNS];
//
// short s_max, s_min;
//
// if(devparms.math_decode_threshold_auto)
// {
// for(j=0; j<MAX_CHNS; j++)
// {
// s_max = -32768;
// s_min = 32767;
//
// for(i=0; i<devparms.wavebufsz; i++)
// {
// if(devparms.wavebuf[j][i] > s_max) s_max = devparms.wavebuf[j][i];
// if(devparms.wavebuf[j][i] < s_min) s_min = devparms.wavebuf[j][i];
// }
//
// threshold[j] = (s_max + s_min) / 2;
// }
// }
// else
// {
// for(j=0; j<MAX_CHNS; j++)
// {
// if(devparms.modelserie == 6)
// {
// // FIXME
// }
// else
// {
// threshold[j] = devparms.math_decode_threshold[j];
// }
// }
// }
//
// if(devparms.math_decode_mode == DECODE_MODE_UART)
// {
// }
}