Writing user data to DS log file

As a first year FRC member I have learned heaps these past few months. My latest discovery was the log files in the driver station. What a wonderful resource of data about what may have just happened in a match or drive test. The team I have joined has been at it for some time and has quite a collection of parts from years past. One of these parts are batteries. They have not always been very responsible at marking how old these batteries are or how often or rotation of these batteries. During one practice match we had terrible brown outs. With my discovery of the log files I see this battery may look ok at rest 12.5vdc but 30 seconds of use and things go south fast. I thought it maybe a great idea if the smartdashboard could get a user input like a battery number and maybe in the ####Init() method write a line in the log to the value of this input. So back home, at the hotel, or in the pits we could have a chance to id what battery may had been used. If we see a pattern to remove that battery from service.

Actually, if you print something out to stdout (eg, System.out.println in java), then I’ve found that the DS log will capture it (though, if you send a lot of output, then it will drop a bunch).

But yes, the DS log is definitely one of the most useful and unknown features that have been added in recent years.