Android Open Source - shiftknob-android Shift Recommendation






From Project

Back to project page shiftknob-android.

License

The source code is released under:

Copyright (c) 2013 Ford Motor Company All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are me...

If you think the Android project shiftknob-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.openxc.shiftindicator;
/*  ww  w  .  j a v  a2s.c  o  m*/
import java.util.Locale;

import com.openxc.measurements.BaseMeasurement;
import com.openxc.units.State;

/**
 * The TransmissionGearPosition is the actual current gear of the transmission.
 * 
 * This measurement is the current actual gear, not the selected or desired gear
 * by the driver or computer.
 */
public class ShiftRecommendation extends
        BaseMeasurement<State<ShiftRecommendation.ShiftSignal>> {
    public final static String ID = "shift_recommendation";

    public enum ShiftSignal {
        UPSHIFT, 
        NONE, 
        DOWNSHIFT
    }

    public ShiftRecommendation(State<ShiftSignal> value) {
        super(value);
    }

    public ShiftRecommendation(ShiftSignal value) {
        this(new State<ShiftSignal>(value));
    }

    public ShiftRecommendation(String value) {
        this(ShiftSignal.valueOf(value.toUpperCase(Locale.US)));
    }

    @Override
    public String getGenericName() {
        return ID;
    }
}




Java Source Code List

com.openxc.shiftindicator.ArduinoHardware.java
com.openxc.shiftindicator.JsonBuilder.java
com.openxc.shiftindicator.MainActivity.java
com.openxc.shiftindicator.SettingsActivity.java
com.openxc.shiftindicator.ShiftRecommendation.java