Files left behind on previous commit
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<launch>
|
||||
<include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch" />
|
||||
<include file="$(find axis_mapping_web_app)/launch/bagger.launch" />
|
||||
</launch>
|
||||
@@ -53,48 +53,3 @@ voltageListener.subscribe(function(message) {
|
||||
updateVoltage(message.battery_voltage_1/1000);
|
||||
updateUpTime(message.up_time)
|
||||
});
|
||||
|
||||
function updateVoltage(voltage)
|
||||
{
|
||||
|
||||
var voltage_min = 9.5;
|
||||
var voltage_max = 12.5;
|
||||
var voltage_range = voltage_max - voltage_min;
|
||||
|
||||
var voltage_percentage = (voltage - voltage_min) / voltage_range * 100;
|
||||
|
||||
var voltage_string = "";
|
||||
voltage_string = voltage_string.concat(voltage_percentage);
|
||||
voltage_string = voltage_string.substring(0,4);
|
||||
voltage_string = voltage_string.concat('%');
|
||||
|
||||
document.getElementById("VoltageDisplay").style.width = voltage_string;
|
||||
document.getElementById("VoltageDisplay").innerHTML = voltage_string;
|
||||
|
||||
if (voltage_percentage < 50 && voltage_percentage > 25 ) {
|
||||
document.getElementById("VoltageDisplay").className = "progress-bar progress-bar-warning"
|
||||
}
|
||||
else if ( voltage_percentage <= 25)
|
||||
{
|
||||
document.getElementById("VoltageDisplay").className = "progress-bar progress-bar-danger"
|
||||
var sound = document.getElementById("audio");
|
||||
sound.play()
|
||||
console.log("Pay Sound")
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("VoltageDisplay").className = "progress-bar progress-bar-success"
|
||||
}
|
||||
};
|
||||
|
||||
function updateUpTime(time)
|
||||
{
|
||||
document.getElementById("UpTime").innerHTML = time
|
||||
};
|
||||
|
||||
|
||||
function validateForm()
|
||||
{
|
||||
ros.attemptConnection();
|
||||
return false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user