【发布时间】:2015-08-25 08:35:44
【问题描述】:
我将我的树莓派与 raspbian 一起用作显示我创建的网页的信息亭。 一切正常,但是当我的网站需要更改 png 时,它的反应很慢。 如果我在我的桌面上运行相同的网页,反应会更快。
我使用命令 chromium --kiosk http://myurl.com
我的页面包含 angular,因此我尝试不支持的其他浏览器(例如 midori)其他浏览器,如顿悟网络(raspbian 的默认浏览器)工作正常但不支持 kiosk 模式。
任何想法如何改进它?
代码: 查看
@using Unitronics.Apms.ApmsWebClient.Resources.Views.Display
@model Unitronics.Apms.ApmsWebClient.Models.Display
<div>
<div class="image" id="image1">
</div>
<div class="image" id="image2">
</div>
<div class="warningImage" id="warningImage">
</div>
</div>
@section scripts {
<!--Script references. -->
<!--The jQuery library is required and is referenced by default in _Layout.cshtml. -->
<!--Reference the SignalR library. -->
<script src="~/Scripts/jquery.signalR-1.1.3.js"></script>
<!--Reference the auto generated SignalR hub script. -->
<script src="~/signalr/hubs"></script>
<!--SignalR script to update the chat page and send messages.-->
<!--Roy Foscam test-->
<script>
$(function() {
hideAll();
$("#image1").show();
// Reference the auto-generated proxy for the hub.
var bayHub = $.connection.bayHub;
bayHub.client.notifyRejects = function(rejects) {
hideAll();
if (rejects.image2)
$("#image2").show();
if (rejects.warning)
$("#warningImage").show();
};
function hideAll() {
$("#image2").hide();
$("#warningImage")..hide();
}
// Start the connection.
$.connection.hub.start().done(function() {
// Register
bayHub.server.register(@Model.DisplayId);
});
});
</script>
}
这或多或少是我的代码。 我只是稍微编辑它以使其更短,但它会对它从另一个设备接收的一些输出做出反应,并且它应该根据它获得的输入来更改图像。
【问题讨论】:
标签: asp.net-mvc-5 raspberry-pi raspbian kiosk-mode