'
+ echo -ne '
'$BTITLE'
'
else
echo -ne '
'$ARGUMENT'
'
fi
diff --git a/SD_ROOT/wz_mini/www/cgi-bin/config.css b/SD_ROOT/wz_mini/www/cgi-bin/config.css
index 5f8d8b3..21b1318 100644
--- a/SD_ROOT/wz_mini/www/cgi-bin/config.css
+++ b/SD_ROOT/wz_mini/www/cgi-bin/config.css
@@ -57,10 +57,11 @@ H1 {
z-index:10;
}
.ii_explain {
- height:25px;
+ height:20px;
overflow:hidden;
- width:25px;
+ width:20px;
position:relative;
+ color:transparent;
}
.ii_explain:hover {
height: auto;
@@ -74,6 +75,7 @@ H1 {
border: 3px solid blue;
font-family: monospace;
white-space:pre-wrap;
+ color:black;
}
.ii_explain:hover PRE {
white-space:pre-wrap;
@@ -91,10 +93,7 @@ H1 {
content:"?";
text-align:center;
background-color:blue;
- border:2px solid #ccc;
- border-radius:3px;
- padding-left:2px;
- padding-right:2px;
+ border-radius:50%;
position:absolute;
left:0;
top:0;
diff --git a/SD_ROOT/wz_mini/www/cgi-bin/diagnostics.cgi b/SD_ROOT/wz_mini/www/cgi-bin/diagnostics.cgi
index c9651b1..b84a365 100644
--- a/SD_ROOT/wz_mini/www/cgi-bin/diagnostics.cgi
+++ b/SD_ROOT/wz_mini/www/cgi-bin/diagnostics.cgi
@@ -15,8 +15,8 @@ echo -ne '';
dmesg_test()
{
-x=$(dmesg | grep $1)
-if [-n "$x" ]; then
+x=$(dmesg | grep "$1")
+if [ -n "$x" ]; then
echo "
$2 error found
"
else
echo "
no $2 error
"
@@ -24,6 +24,18 @@ fi
}
+logread_test()
+{
+x=$(logread | grep "$1")
+
+if [ -n "$x" ]; then
+ echo "
$2 error found
"
+else
+ echo "
no $2 error
"
+fi
+
+}
+
echo "HTTP/1.1 200"
echo -e "Content-type: text/html\n\n"
echo ""
@@ -42,7 +54,8 @@ echo "
SD Card Test
"
dmesg_test "invalid access to FAT" "SD card"
dmesg_test "Filesystem has been set read-only" "SD read only"
dmesg_test "fat_get_cluster: invalid cluster chain" "file system"
-
+logread_test "run: tf_prepare failed!" "SD card (tf_prepare)"
+logread_test "(health_test) fail" "SD card health fail"
echo "
Firmware Version Test
"
diff --git a/SD_ROOT/wz_mini/www/cgi-bin/shared.cgi b/SD_ROOT/wz_mini/www/cgi-bin/shared.cgi
index 3ae37c0..a013b3b 100644
--- a/SD_ROOT/wz_mini/www/cgi-bin/shared.cgi
+++ b/SD_ROOT/wz_mini/www/cgi-bin/shared.cgi
@@ -19,6 +19,9 @@ camver="$camtype($cammodel)"
hackver=$(cat /opt/wz_mini/usr/bin/app.ver)
+ipaddr=$(ifconfig wlan0 | grep inet | cut -d ':' -f2 | cut -d ' ' -f0)
+macaddr=$(ifconfig wlan0 | grep HWaddr | cut -d 'HW' -f2 | cut -d ' ' -f2)
+
function version_info
{
echo "
"
diff --git a/SD_ROOT/wz_mini/www/config.js b/SD_ROOT/wz_mini/www/config.js
index 6ede20b..654a3ad 100644
--- a/SD_ROOT/wz_mini/www/config.js
+++ b/SD_ROOT/wz_mini/www/config.js
@@ -18,6 +18,44 @@ window.scrollTo({
}
+function compose_rtsp_block(stype)
+{
+ const formElement = document.querySelector("form");
+ var fdata = new FormData(formElement);
+
+ var stype = (typeof stype !== "undefined") ? stype: "RTSP_HI_RES";
+
+
+ if (fdata.get(stype + "_ENABLED") != "true") {
+ console.log(stype + " not enabled");
+ return false;
+ }
+
+ var auth = "";
+ if (fdata.get('RTSP_AUTH_DISABLE') != "true") {
+ auth = fdata.get('RTSP_LOGIN') + ':';
+ if (fdata.get('RTSP_PASSWORD') != '') {
+ auth += fdata.get('RTSP_PASSWORD');
+ } else {
+ auth += document.body.getAttribute('mac');
+ }
+ auth += "@";
+ }
+
+
+ stream = "/unicast";
+ if ((fdata.get('RTSP_HI_RES_ENABLED') == "true") && (fdata.get('RTSP_LOW_RES_ENABLED') == "true")) {
+ if (stype == "RTSP_HI") { stream = "/video1_unicast" } else { stream ="/video2_unicast" }
+ }
+
+ var link = "rtsp://" + auth + document.body.getAttribute("ip") + ":" + fdata.get('RTSP_PORT') + stream;
+
+ var vb = document.querySelectorAll('[block_name="VIDEOSTREAM"]')[0];
+ var url_block = document.createElement('DIV');
+ url_block.innerHTML = 'Stream ' + stype + ' URL: ' + '
' + link + '' ;
+ vb.appendChild(url_block);
+}
+
window.onload = function()
{
var feed = document.getElementById("current_feed");
@@ -27,6 +65,8 @@ window.onload = function()
}
feed_interval = setInterval(update_image, feed_interval_frequency);
+ compose_rtsp_block('RTSP_HI_RES');
+ compose_rtsp_block('RTSP_LOW_RES');
document.querySelector('[name="update_config"]').addEventListener('submit',
function(e){