]> rtime.felk.cvut.cz Git - CanFestival-3.git/commitdiff
Forces an emission of PDO by resetting the COB of the last message
authorpeter <peter>
Fri, 14 Mar 2008 09:55:34 +0000 (09:55 +0000)
committerpeter <peter>
Fri, 14 Mar 2008 09:55:34 +0000 (09:55 +0000)
examples/AVR/Slave/ds401.c

index 7c9a93e6e7e2e76a89ff71906044a50347b450ce..4ab60bd2b45fc676a49d2e315681b248dbcc7bc2 100644 (file)
@@ -49,7 +49,11 @@ unsigned char digital_input_handler(CO_Data* d, unsigned char *newInput, unsigne
     newInput++;
   }
   if (transmission)
+  {
+  /* force emission of PDO by artificially changing last emitted*/
+    d->PDO_status[0].last_message.cob_id = 0;
     sendPDOevent(d);
+  }
 
   return 1;
 }