-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
124 lines (100 loc) · 5.44 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<script src="Lib/knockout-3.1.0.js"></script>
<script src="Lib/jquery-2.1.1.min.js"></script>
<script src="Lib/moment-2.8.4.min.js"></script>
<script src="OvenViewModel.js"></script>
<script src="StatusProperties.js"></script>
<script src="UserInterface.js"></script>
<script src="Timers.js"></script>
<script src="Subscriptions.js"></script>
<script src="OvenManager.js"></script>
<script src="TemperatureManagement.js"></script>
<script src="TimerManagement.js"></script>
<script src="SoundManagement.js"></script>
<script src="OvenProgramManagement.js"></script>
<script src="OvenProgramFactory.js"></script>
<script src="OvenProgram.js"></script>
<script src="OvenProgramStage.js"></script>
<script src="OvenScripts.js"></script>
<script>
$(document).ready(function() {
var ovenViewModel = new OvenViewModel(true, true);
ko.applyBindings(ovenViewModel);
ovenViewModel.TurnOvenOn();
//new OvenScripts().SetProgram1_1TempToCP(ovenViewModel);
//OvenScripts.SetProgram1To150DegreesAnd5MinutesThenBackToHome(ovenViewModel);
//OvenScripts.Setup3StageProgram_All150WithTime_BackToHome(ovenViewModel);
//OvenScripts.SelectProgram1PreHeatAndStart(ovenViewModel);
//OvenScripts.SetTimerTo1Second(ovenViewModel);
//Testing
//ovenViewModel.IncreaseTimer();
console.clear();
//ovenViewModel.TimerButtonDown();
//ovenViewModel.ConnectCoreProbe();
//ovenViewModel.IncreaseTargetCoreTemperature();
});
</script>
<title>Moffat Oven Simulator</title>
<link type="text/css" href="style.css" rel="stylesheet">
</head>
<body>
<div class="controlPanel" style="float: left">
<div class="TopPadding">
</div>
<div class="displayBox DisplayLeftMargin" data-bind="text: TopDisplay"></div>
<div class="ButtonsLeftMargin ButtonsTopMargin">
<!--Steam-->
<button class="btn" data-bind="event: { mousedown: SteamButtonDown, mouseup: SteamButtonUp, mouseout: ClearMoistureModeTimer }, css: LightOn_Steam() ? 'btnSteam_On' : 'btnSteam_Off'"></button>
<!--Program-->
<button class="btn ButtonLeftMargin" data-bind="event: { mousedown: ProgramButtonDown, mouseup: ProgramButtonUp, mouseout: ClearEditProgramStartTimer }, css: LightOn_Program() ? 'btnProgram_On' : 'btnProgram_Off'"></button>
<!--Temp-->
<button class="btn ButtonLeftMargin" data-bind="click: TempButtonUp, css: LightOn_Temp() ? 'btnTemp_On' : 'btnTemp_Off'"></button>
</div>
<div class="TempTopPadding SplitLeftMargin">
<div class="btnTemp_Minus" data-bind="click: btnTemp_MinusClick"></div>
<div class="btnTemp_Plus" data-bind="click: btnTemp_PlusClick"></div>
<div style="clear: both"></div>
</div>
<div class="BottomDisplayTopMargin">
<div class="displayBox DisplayLeftMargin" data-bind="text: BottomDisplay"></div>
</div>
<div class="ButtonsLeftMargin ButtonsTopMargin">
<!--LightPowerButton-->
<button class="btn" data-bind="event: { mousedown: LightPowerButtonDown, mouseup: LightPowerButtonUp }, css: LightOn_LightPower() ? 'btnLightPower_On' : 'btnLightPower_Off'"></button>
<!--Fan-->
<button class="btn ButtonLeftMargin" data-bind="click: ButtonClickFan, css: LightOn_Fan() ? 'btnFan_On' : 'btnFan_Off'"></button>
<!--Timer-->
<button class="btn ButtonLeftMargin" data-bind="event: { mousedown: TimerButtonDown, mouseup: TimerButtonUp }, css: LightOn_Timer() ? 'btnTimer_On' : 'btnTimer_Off'"></button>
</div>
<div class="TimerTopPadding SplitLeftMargin">
<div class="btnTimer_Minus" data-bind="click: btnTimer_MinusClick"></div>
<div class="btnTimer_Plus" data-bind="click: btnTimer_PlusClick"></div>
</div>
</div>
<div style="float: left; padding: 10px;">
<div data-bind="text: 'Core probe connected: ' + CoreProbeConnected()"></div>
<button data-bind="click: ConnectCoreProbe, visible: !CoreProbeConnected()">Connect Core Probe</button>
<button data-bind="click: DisconnectCoreProbe, visible: CoreProbeConnected">Disconnect Core Probe</button>
<div>
<button data-bind="click: SetDefaults">Set Defaults</button>
</div>
<div>
<span>Actual Temp:</span><span data-bind="text: Math.round(ActualTemperature() * 10) / 10">Temperature</span>
</div>
<div>
<span>Target Temp:</span><span data-bind="text: Math.round(TargetTemperature() * 10) / 10">Temperature</span>
</div>
<span data-bind="text: '(x' + TimeDilation() + ')'"></span>
<button class="btn" data-bind="click: DecreaseTimeDilation">slower</button>
<button class="btn" data-bind="click: IncreaseTimeDilation">faster</button>
<label>Set Temperature</label>
<input data-bind="value: TargetTemperature" type="number" style="width: 200px" />
<audio controls id="beepControl" preload="auto" style="display: none">
<source src="Sounds/beep1.mp3" type="audio/mpeg">
</audio>
</div>
</body>
</html>