View Full Version : put and get
Robert Hafner
09-02-2004, 16:10
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.
gnormhurst
09-02-2004, 16:59
the putdata function updates the pwms right?
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\n",(int)p1_y,(int)p1_x,(int)p1_sw_trig,(int)p1_sw_to p); /* printf EXAMPLE */
Generate_Pwms(pwm13,pwm14,pwm15,pwm16);
Putdata(&txdata); /* DO NOT CHANGE! */
}
Jay Lundy
10-02-2004, 01:57
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.
deltacoder1020
10-02-2004, 10:58
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.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.