GithubHelp home page GithubHelp logo

WorksSwitch about cerea HOT 4 CLOSED

aortner avatar aortner commented on August 15, 2024
WorksSwitch

from cerea.

Comments (4)

aortner avatar aortner commented on August 15, 2024 1

Add these 2 lines to this in SerialComm.cs

mc.workSwitchValue = mc.steerSwitchValue & 1;
mc.steerSwitchValue = mc.steerSwitchValue & 2;

Code:
//called by the AutoSteer module delegate every time a chunk is rec'd
private void SerialLineReceivedAutoSteer(string sentence)
{
//spit it out no matter what it says
mc.serialRecvAutoSteerStr = sentence;

        //0 - steer angle, 1 - pwm, 2 - heading in degrees * 16, 3 - roll in degrees * 16, 4 - steerSwitch position

        string[] words = mc.serialRecvAutoSteerStr.Split(',');
        if (words.Length == 5)
        {
            //first 2 used for display mainly in autosteer window chart as strings
            //parse the values
            if (ahrs.isHeadingBNO)
            {
                mc.prevGyroHeading = mc.gyroHeading;
                int.TryParse(words[2], out mc.gyroHeading);
            }

            if (ahrs.isRollDogs) int.TryParse(words[3], out mc.rollRaw);

            int.TryParse(words[4], out mc.steerSwitchValue);
            mc.workSwitchValue = mc.steerSwitchValue & 1;
            mc.steerSwitchValue = mc.steerSwitchValue & 2;
        }
    }

from cerea.

aortner avatar aortner commented on August 15, 2024

Quote:
Originally Posted by BrianTee View Post
........ Forgot the equals. At the moment AOG doesn't use the switch setting..........
As Brian said: not yet working!

from cerea.

aortner avatar aortner commented on August 15, 2024

Quote:
Originally Posted by Weder View Post
As Brian said: not yet working!

todo - would be usefull for some work with no youturn...

from cerea.

aortner avatar aortner commented on August 15, 2024

I'll forward that problem to the hardware engineering team, those guys are a bunch of slackers!

from cerea.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.