Skip to content

Commit

Permalink
Fixed problem with send timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Jul 27, 2015
1 parent 92b0e46 commit 6c31447
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion kelvin_ntc.X/nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
</file>
</editor-bookmarks>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group/>
<group>
<file>file:/C:/Users/grodansparadis/development/can4vscp_kelvin_ntc10k/main.c</file>
</group>
</open-files>
</project-private>
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ void interrupt low_priority interrupt_at_low_vector( void )
vscp_configtimer++;
measurement_clock++;
timeout_clock++;
sendTimer++;

// Check for init button
if (!(PORTC & 0x01)) {
Expand Down Expand Up @@ -393,7 +394,6 @@ void main()
measurement_clock = 0;
doOneSecondWork();
seconds++;
sendTimer++;

// Temperature report timers are only updated if in active
// state
Expand Down Expand Up @@ -2898,7 +2898,7 @@ int8_t sendCANFrame(uint32_t id, uint8_t dlc, uint8_t *pdata)
uint8_t rv = FALSE;
sendTimer = 0;

while ( sendTimer < 1 ) {
while ( sendTimer < 1000 ) {
if ( ECANSendMessage( id, pdata, dlc, ECAN_TX_XTD_FRAME ) ) {
rv = TRUE;
break;
Expand Down

0 comments on commit 6c31447

Please sign in to comment.