speichern bevor bugsuche
This commit is contained in:
parent
e3b7d60e16
commit
0d439d97b8
15
drv/b15f.cpp
15
drv/b15f.cpp
|
@ -278,8 +278,9 @@ bool B15F::analogEingabeSequenz(uint8_t channel_a, uint16_t* buffer_a, uint32_t
|
|||
|
||||
if(aw != MSG_OK)
|
||||
{
|
||||
discard();
|
||||
return analogEingabeSequenz(channel_a, buffer_a, offset_a, channel_b, buffer_b, offset_b, start, delta, count);
|
||||
throw std::runtime_error("Out of sync");
|
||||
//discard();
|
||||
//return analogEingabeSequenz(channel_a, buffer_a, offset_a, channel_b, buffer_b, offset_b, start, delta, count);
|
||||
}
|
||||
|
||||
for(uint16_t i = 0; i < count; i++)
|
||||
|
@ -293,6 +294,7 @@ bool B15F::analogEingabeSequenz(uint8_t channel_a, uint16_t* buffer_a, uint32_t
|
|||
std::cout << "fordere neu an" << std::endl;
|
||||
}
|
||||
while(!crc_ok);
|
||||
std::cout << "OK" << std::endl;
|
||||
|
||||
buffer_a[offset_a + i] = ((uint16_t) block[0]) | (((uint16_t) block[1]) << 8);
|
||||
buffer_b[offset_b + i] = ((uint16_t) block[2]) | (((uint16_t) block[3]) << 8);
|
||||
|
@ -382,8 +384,10 @@ bool B15F::readBlock(uint8_t* buffer, uint16_t offset)
|
|||
std::cout << PRE << "n_ready code: " << code << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(n_ready >= len + 1)
|
||||
break;
|
||||
|
||||
end = std::chrono::steady_clock::now();
|
||||
elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
|
||||
}
|
||||
|
@ -399,6 +403,8 @@ bool B15F::readBlock(uint8_t* buffer, uint16_t offset)
|
|||
if(code != 1)
|
||||
{
|
||||
std::cout << PRE << "read code: " << code << std::endl;
|
||||
tcflush(usart, TCIFLUSH); // leere Eingangspuffer
|
||||
writeByte(MSG_FAIL);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -419,6 +425,11 @@ bool B15F::readBlock(uint8_t* buffer, uint16_t offset)
|
|||
crc >>= 1;
|
||||
}
|
||||
|
||||
if(TEST == 1)
|
||||
crc = 1;
|
||||
if(TEST > 100)
|
||||
TEST = 0;
|
||||
|
||||
if (crc == 0)
|
||||
{
|
||||
writeByte(MSG_OK);
|
||||
|
|
|
@ -55,6 +55,7 @@ private:
|
|||
int usart = -1;
|
||||
uint16_t timeout = 200; // ms
|
||||
uint16_t block_timeout = 1; // ms
|
||||
int TEST = 0;
|
||||
|
||||
static B15F* instance;
|
||||
|
||||
|
|
BIN
drv/b15f.o
BIN
drv/b15f.o
Binary file not shown.
|
@ -9,24 +9,24 @@ set x2range [5:0]
|
|||
set y2range [0:50]
|
||||
set yrange [0:50]
|
||||
set label at 2,32 'U_{DS} [V] = 300' right
|
||||
set label at 2,30 'U_{DS} [V] = 325' right
|
||||
set label at 2,31 'U_{DS} [V] = 325' right
|
||||
set label at 2,33 'U_{DS} [V] = 350' right
|
||||
set label at 2,21 'U_{DS} [V] = 375' right
|
||||
set label at 2,35 'U_{DS} [V] = 375' right
|
||||
set label at 2,21 'U_{DS} [V] = 400' right
|
||||
set label at 2,5 'U_{DS} [V] = 425' right
|
||||
set label at 2,22 'U_{DS} [V] = 425' right
|
||||
set label at 2,22 'U_{DS} [V] = 450' right
|
||||
set label at 2,12 'U_{DS} [V] = 475' right
|
||||
set label at 2,22 'U_{DS} [V] = 475' right
|
||||
set label at 2,23 'U_{DS} [V] = 500' right
|
||||
set label at 2,23 'U_{DS} [V] = 525' right
|
||||
set label at 2,2 'U_{DS} [V] = 550' right
|
||||
set label at 2,12 'U_{DS} [V] = 525' right
|
||||
set label at 2,5 'U_{DS} [V] = 550' right
|
||||
set label at 2,12 'U_{DS} [V] = 575' right
|
||||
set label at 2,13 'U_{DS} [V] = 600' right
|
||||
set label at 2,5 'U_{DS} [V] = 625' right
|
||||
set label at 2,6 'U_{DS} [V] = 650' right
|
||||
set label at 2,6 'U_{DS} [V] = 675' right
|
||||
set label at 2,2 'U_{DS} [V] = 700' right
|
||||
set label at 2,2 'U_{DS} [V] = 700' right
|
||||
set label at 2,2 'U_{DS} [V] = 600' right
|
||||
set label at 2,12 'U_{DS} [V] = 625' right
|
||||
set label at 2,2 'U_{DS} [V] = 650' right
|
||||
set label at 2,2 'U_{DS} [V] = 650' right
|
||||
set label at 2,2 'U_{DS} [V] = 700' right
|
||||
set label at 2,2 'U_{DS} [V] = 725' right
|
||||
set label at 2,2 'U_{DS} [V] = 725' right
|
||||
set y2tics
|
||||
unset ytics
|
||||
set ytics format ''
|
||||
|
|
Loading…
Reference in a new issue