View unanswered posts | View active topics It is currently Fri Dec 14, 2018 9:45 am






Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Way to Tell if SMUX is Not Responding? Battery Level? 
Author Message
Rookie

Joined: Mon Dec 15, 2014 12:46 am
Posts: 19
Post Re: Way to Tell if SMUX is Not Responding? Battery Level?
Also, here is another scrapped down version taking the battery bool. It works without the sensor MUX, I have yet to test it today to confirm it can 'see' the sensor MUX.
Code:
      if(HTSMUXreadPowerStatus(S2) == true) //Checking Battery in Sensor Port...Returning True means problem w/Battery
      {//Print SMUX: OFF
         sprintf(sSMUXStat,sSMUXOFF);      
      }
      else
      {//Print SMUX: ON
         sprintf(sSMUXStat,sSMUXConnected);
      }
         nxtDisplayString(5, "SMUX: %s", sSMUXStat);


_________________
FTC 7104 - The Synergists


Sat Jan 17, 2015 12:33 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: Way to Tell if SMUX is Not Responding? Battery Level?
You could probably shorten that to something like:
Code:
displayString(5, "SMUX: %s", HTSMUXreadPowerStatus(S2) ? "OFF" : "ON");

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Jan 17, 2015 1:18 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 17 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.