Go to Post I believe youth is contagious. I want to catch as much as I can! - Al Skierkiewicz [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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
  #5   Spotlight this post!  
Unread 01-02-2016, 12:20
wazateer1 wazateer1 is offline
Registered User
FRC #3506 (YETI Robotics)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2013
Location: Charlotte, NC
Posts: 30
wazateer1 is a splendid one to beholdwazateer1 is a splendid one to beholdwazateer1 is a splendid one to beholdwazateer1 is a splendid one to beholdwazateer1 is a splendid one to beholdwazateer1 is a splendid one to beholdwazateer1 is a splendid one to behold
Re: Sub-Class CANTalon to represent 3 motors

Quote:
Originally Posted by lethc View Post
Why?
I thought the same at first (when I started writing this), and figured I could use super for most of the functions I needed. But I realized as I was writing this that each function that will get called and actually DOES anything needs to be @Overrid and pointed to all three Talons. Unless there is a function in CANTalon that simply IDENTIFIES the CANTalons, that doesn't DO anything that needs to be overridden (eg public String getType() {return "CANTalon"}, it would be simpler. He has a point, there is no reason TO implement CANTalons unless there is said identifying function


Quote:
Originally Posted by notmattlythgoe View Post
The SpeedController is the base interface for all of the motor controllers. This way you know you are implementing all of the stuff that needs implemented. Really it should just be calling the same method that you're implementing for each of the CANTalons.
CANTalon does implement SpeedController, by extending it my class inherits all the functions, plus the way CANTalons identify themselves

Ultimately, it comes to not having to call the super constructor, and I will go with notmattlythgoe that directly implementing SpeedController is better
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 12:35.

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


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