put and get

the putdata function updates the pwms right?

:] <-- LEGO Guy amuses me. (notes that since LEGO isn’t capitalized on the smilie bar LEGO Systems, Inc. would not be pleased. . . )<-- off topic.

Yes, that’s what I understand. Except for pwm’s 13, 14, 15 & 16, which are updated by Generate_Pwms:

void Process_Data_From_Master_uP(void)
  Getdata(&rxdata);   /* Get fresh data from the master microprocessor. */

  Default_Routine();  /* Optional.  See below. */

  /* Add your own code here. */

  printf("Port1 Y %3d, X %3d, Fire %d, Top %d
",(int)p1_y,(int)p1_x,(int)p1_sw_trig,(int)p1_sw_top);  /* printf EXAMPLE */


  Putdata(&txdata);             ** /* DO NOT CHANGE! */

Putdata also updates the data that is sent back over the radio to the OI dashboard port and LEDs. Basically it updates the data on the master to reflect the changes in the txdata variable by the user.

It only actually updates the PWMs every 26.2ms. You can call it more often, but it won’t do anything.

basically, it updates what the master processor is “seeing” from the user processor. every 26.2ms, the master processor takes a snapshot of this and uses it to update the PWMs, et cetera.