View Single Post
  #1   Spotlight this post!  
Unread 30-07-2015, 07:33
GuyM142's Avatar
GuyM142 GuyM142 is offline
Registered User
AKA: Guy
FRC #3339 (BumbleBee)
Team Role: Mentor
 
Join Date: Jul 2013
Rookie Year: 2012
Location: Israel
Posts: 158
GuyM142 is just really niceGuyM142 is just really niceGuyM142 is just really niceGuyM142 is just really niceGuyM142 is just really nice
Quote:
Originally Posted by Greg McKaskle View Post
If you want to know if a debugging host is connected, I believe you want to use a Property Node to read the App.UserInterfaceAvailable property. Read the help and I think you will see that it does what you want. If not, please explain more of what you are looking for.

Greg McKaskle
This is what I'm looking for, I'll try it.
Quote:
Originally Posted by Ari423 View Post
I just had an idea. When you get the file path of Robot Main in Robot Main, if it is built and running in the robot project the second to last string in the file path will be projectName.exe, whereas if you were running it in debug mode (manually running Robot Main) the second to last string in the file path will be the folder the project is in. You should be able to get the file path, strip it twice, and search the second stripped string for ".exe". If you are running a build the index will be greater than 0 (it exists somewhere in the string). If it is running in debug mode, the index will be -1 (search string isn't in source string). You can then save this bool as a global, carry it into teleop and/or periodic, or do whatever you want with it. Let me know if this works.

EDIT: I think this is what you are looking for without using any complicated property nodes. There may be other ways to do the same thing using property nodes or otherwise, and you should feel free to use whichever you feel is easier. My original suggestion about removing this code from the final project still stands.
I want to try your method but I don't have enough experience with LabVIEW strings. Can you post here the code that does what you have explained?
__________________
2016-2017 - Programming Mentor
Curie Sub-Division Champions with 694, 379 & 1511
2015 - Team Captain & Head of Programming Crew
Carson Sub-Division Champions with 1325, 20 & 1711
First ever Israeli team on Einstein
2014 - Team Captain & Head of Programming Crew
2013 - Head of Programming Crew
2012 - Member of Programming Crew
Reply With Quote