Go to Post You will "generously donate" your game pieces into your opponent's goal. - johnr [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 20 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #25   Spotlight this post!  
Unread 31-08-2015, 14:34
Cel Skeggs Cel Skeggs is offline
Robot Software Manager Alumnus
AKA: Previously known as Colby
FRC #1540 (The Flaming Chickens)
Team Role: Alumni
 
Join Date: Feb 2013
Rookie Year: 2009
Location: Portland, Oregon, USA
Posts: 107
Cel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of light
Re: The CCRE: A comprehensive award-winning robot code framework

I've been working on some prototypes for the 3.0.0 release. This release includes a lot of improvements to the Mixing system, namely by getting rid of the Mixing, FloatMixing, BooleanMixing, and EventMixing classes, and using Java 8's new default interfaces to implement the same functionality on the objects themselves.

As an example of how much this can help:

Code:
Mixing.select(calibrating, FloatMixing.multiplication.of(FloatMixing.multiplication.of(p, (FloatInput) dconstant), (FloatInput) period), FloatMixing.always(0));
becomes

Code:
calibrating.toFloat(p.multipliedBy(dconstant).multipliedBy(period), 0);
which is much easier to understand and has a lot less boilerplate!

Also, the Input/InputPoll distinction is going away, which means (for example) that code will no longer be scattered with FloatMixing.createDispatch and BooleanMixing.createDispatch everywhere!

To replace the previous easy of use of InputPolls that is now going away, code like:

Code:
BooleanMixing.createDispatch(new BooleanInputPoll() {
    public boolean get() {
        return /* some expression */;
    }
}, Igneous.globalPeriodic)
is now written as

Code:
new DerivedBooleanInput(/* dependent inputs */) {
    protected boolean apply() {
        return /* same expression as above */;
    }
}
This is slightly more complicated in that you have to specify when the value could update, but it ultimately will lead to better, easier-to-understand code and less overhead.
__________________
Software manager alumnus. Developer of the CCRE, a powerful robot code framework based on dataflow and composibility.
Refer to as she/her/hers. Years of FRC: 2012, 2013, 2014, 2015, 2016. FLL for a few years beforehand.
Team 1540: The Flaming Chickens | Portland, Oregon | Twitter | Facebook
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 10:31.

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