Go to Post Whether or not your team has the technical mentors, as long as your kids are still inspired by the adult technical mentors of other teams, and get the picture that we're trying to portray in this program, the best that you can do is the best you can do. Do it, and be proud of your results. - Beth Sweet [more]
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-15-2012, 02:10 PM
DjScribbles DjScribbles is offline
Programming Mentor
AKA: Joe S
FRC #2474 (Team Excel)
Team Role: Mentor
Join Date: Oct 2011
Rookie Year: 2012
Location: Niles MI
Posts: 284
DjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to behold
Tasks based programming questions

So I feel like our teams teleop code is in a pretty good place as of last night, and we're getting started with autonomous (and the kinect ). But I'm also a bit curious if I should consider shuffling some routines into tasks.

Here's my current teleop code:
void TeleopPeriodic(void)
    // increment the number of teleop periodic loops completed
        anglesComputed = false;
        testCount = 0;
    AxisCamera &camera = AxisCamera::GetInstance("");
    if (camera.IsFreshImage())
        ColorImage *colorImage = new ColorImage(IMAQ_IMAGE_HSL);
        if (BUTTON_CAMERA_ALIGN_SHOT_BUTTON() && (anglesComputed == false))
        delete colorImage;

void TeleopContinuous(void)
    (anglesComputed == true))
My other question is do any of the WPILib constructs, like Jaguar, Joystick, Gyro, etc play nice when shared between tasks, or do I need to set things up with semaphores and protect them (semaphoreDriverStick.get) OR will the inards of the WPILib choke if I try to use these attributes outside of the main task (implying that I will need to get values and put them into a seperate variable so I can protect them)?

Unrelated question: How often is periodic? Is it called at a set rate, or is it only when control packets are recieved from the DS (which would really be semi-periodic)?

Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 03:46 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi