annotate Discovery/Src/tMenuSetpoint.c @ 910:7bd347bdaa81 Evo_2_23

Devbugfix Sample time resolution for longer dives: If a dive is longer than the provided replay buffer then the sample data is compressed. This compression was not considered in the previous version. As result the dive was replayed with double speed because a single sample were interpretated as 2 seconds instead of e.g. 4 seconds for a compressed sample. The comprassion rate is now considered in the simulator replay function
author Ideenmodellierer
date Tue, 15 Oct 2024 19:12:05 +0200
parents c4ee952b9425
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 ///////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 /// -*- coding: UTF-8 -*-
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 /// \file Discovery/Src/tMenuSetpoint.c
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 /// \brief
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 /// \author heinrichs weikamp gmbh
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 /// \date 19-Dec-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 /// \details
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 /// $Id$
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 ///////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 /// This program is free software: you can redistribute it and/or modify
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 /// it under the terms of the GNU General Public License as published by
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 /// the Free Software Foundation, either version 3 of the License, or
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 /// (at your option) any later version.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 /// This program is distributed in the hope that it will be useful,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 /// but WITHOUT ANY WARRANTY; without even the implied warranty of
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 /// GNU General Public License for more details.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 /// You should have received a copy of the GNU General Public License
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 /// along with this program. If not, see <http://www.gnu.org/licenses/>.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 //////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 #include "tMenu.h"
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
31 #include "tMenuEditSetpoint.h"
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 #include "tMenuSetpoint.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 #include "unit.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 /* Private function prototypes -----------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
39 uint32_t tMSP_refresh(char *text, uint16_t *tab, char *subtext)
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 {
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
41 SSettings *settings = settingsGetPointer();
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
42
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 const SSetpointLine * pSetpointLine;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
45 uint8_t textPointer, setpoint_cbar, depthUp, first;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 if(actual_menu_content == MENU_SURFACE)
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
48 pSetpointLine = settings->setpoint;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 pSetpointLine = stateUsed->diveSettings.setpoint;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52 textPointer = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 *tab = 130;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 *subtext = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 650
diff changeset
56 if((actual_menu_content == MENU_SURFACE) || (stateUsed->diveSettings.diveMode != DIVEMODE_PSCR)) /* do not show setpoints in PSCR mode */
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 {
816
c4ee952b9425 Fix a bug that disables arbitrary menu lines in dive mode if lines are disabled / inactive in surface mode. (mikeller)
heinrichsweikamp
parents: 811
diff changeset
58 if (settings->autoSetpoint) {
c4ee952b9425 Fix a bug that disables arbitrary menu lines in dive mode if lines are disabled / inactive in surface mode. (mikeller)
heinrichsweikamp
parents: 811
diff changeset
59 disableLine(StMSP_Blank);
c4ee952b9425 Fix a bug that disables arbitrary menu lines in dive mode if lines are disabled / inactive in surface mode. (mikeller)
heinrichsweikamp
parents: 811
diff changeset
60 } else {
c4ee952b9425 Fix a bug that disables arbitrary menu lines in dive mode if lines are disabled / inactive in surface mode. (mikeller)
heinrichsweikamp
parents: 811
diff changeset
61 enableLine(StMSP_Blank);
811
4c41d9a18c7f Added function to skip lines which are not needed for operation:
Ideenmodellierer
parents: 792
diff changeset
62 }
816
c4ee952b9425 Fix a bug that disables arbitrary menu lines in dive mode if lines are disabled / inactive in surface mode. (mikeller)
heinrichsweikamp
parents: 811
diff changeset
63
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 650
diff changeset
64 for(int spId=1;spId<=NUM_GASES;spId++)
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 650
diff changeset
65 {
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
66 if (settings->autoSetpoint) {
789
b7cd0c5c8e43 When using automatic setpoint switching, allow the user to set an arbitrary ppO2 as a custom setpoint during the dive.
heinrichsweikamp
parents: 788
diff changeset
67 if (spId == 5) {
b7cd0c5c8e43 When using automatic setpoint switching, allow the user to set an arbitrary ppO2 as a custom setpoint during the dive.
heinrichsweikamp
parents: 788
diff changeset
68 if (actual_menu_content == MENU_SURFACE) {
b7cd0c5c8e43 When using automatic setpoint switching, allow the user to set an arbitrary ppO2 as a custom setpoint during the dive.
heinrichsweikamp
parents: 788
diff changeset
69 textPointer += snprintf(&text[textPointer], 40, "\020%c%c\016\016%c%c\017 %c%c\002%c\n\r", TXT_2BYTE, TXT2BYTE_SetpointShort, TXT_2BYTE, TXT2BYTE_SetpointLow, TXT_2BYTE, TXT2BYTE_SetpointDelayed, settings->delaySetpointLow ? '\005' : '\006');
b7cd0c5c8e43 When using automatic setpoint switching, allow the user to set an arbitrary ppO2 as a custom setpoint during the dive.
heinrichsweikamp
parents: 788
diff changeset
70 } else {
b7cd0c5c8e43 When using automatic setpoint switching, allow the user to set an arbitrary ppO2 as a custom setpoint during the dive.
heinrichsweikamp
parents: 788
diff changeset
71 textPointer += snprintf(&text[textPointer], 40, "\020%c%c %c%c\n\r", TXT_2BYTE, TXT2BYTE_Custom, TXT_2BYTE, TXT2BYTE_Setpoint);
b7cd0c5c8e43 When using automatic setpoint switching, allow the user to set an arbitrary ppO2 as a custom setpoint during the dive.
heinrichsweikamp
parents: 788
diff changeset
72 }
b7cd0c5c8e43 When using automatic setpoint switching, allow the user to set an arbitrary ppO2 as a custom setpoint during the dive.
heinrichsweikamp
parents: 788
diff changeset
73
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
74 continue;
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
75 } else if (spId > SETPOINT_INDEX_AUTO_DECO) {
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
76 textPointer += snprintf(&text[textPointer], 3, "\n\r");
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
78 continue;
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
79 }
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
80 }
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
82 setpoint_cbar = pSetpointLine[spId].setpoint_cbar;
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
83 depthUp = pSetpointLine[spId].depth_meter;
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
84 first = pSetpointLine[spId].note.ub.first;
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
85
792
25103f5c7e29 Avoid a configuration warning after the firmware upgrade by disabling automatic setpoint switching. This makes sure the user's automatic setpoint configuration is not overwritten by the validity checks if the settings are not in the correct spots for the new configuration. Users will have to manually re-create the automatic setpoint switching configuration in the new format;
heinrichsweikamp
parents: 789
diff changeset
86 char colour;
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
87 if (settings->autoSetpoint && spId == SETPOINT_INDEX_AUTO_DECO && !pSetpointLine[spId].note.ub.active) {
792
25103f5c7e29 Avoid a configuration warning after the firmware upgrade by disabling automatic setpoint switching. This makes sure the user's automatic setpoint configuration is not overwritten by the validity checks if the settings are not in the correct spots for the new configuration. Users will have to manually re-create the automatic setpoint switching configuration in the new format;
heinrichsweikamp
parents: 789
diff changeset
88 colour = '\031';
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
89 } else {
792
25103f5c7e29 Avoid a configuration warning after the firmware upgrade by disabling automatic setpoint switching. This makes sure the user's automatic setpoint configuration is not overwritten by the validity checks if the settings are not in the correct spots for the new configuration. Users will have to manually re-create the automatic setpoint switching configuration in the new format;
heinrichsweikamp
parents: 789
diff changeset
90 colour = '\020';
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
91 }
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
93 uint8_t setpointBar = setpoint_cbar / 100;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94
792
25103f5c7e29 Avoid a configuration warning after the firmware upgrade by disabling automatic setpoint switching. This makes sure the user's automatic setpoint configuration is not overwritten by the validity checks if the settings are not in the correct spots for the new configuration. Users will have to manually re-create the automatic setpoint switching configuration in the new format;
heinrichsweikamp
parents: 789
diff changeset
95 textPointer += snprintf(&text[textPointer], 4, "%c%c%c", colour, TXT_2BYTE, TXT2BYTE_SetpointShort);
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
96 textPointer += printSetpointName(&text[textPointer], spId, settings, true);
792
25103f5c7e29 Avoid a configuration warning after the firmware upgrade by disabling automatic setpoint switching. This makes sure the user's automatic setpoint configuration is not overwritten by the validity checks if the settings are not in the correct spots for the new configuration. Users will have to manually re-create the automatic setpoint switching configuration in the new format;
heinrichsweikamp
parents: 789
diff changeset
97
25103f5c7e29 Avoid a configuration warning after the firmware upgrade by disabling automatic setpoint switching. This makes sure the user's automatic setpoint configuration is not overwritten by the validity checks if the settings are not in the correct spots for the new configuration. Users will have to manually re-create the automatic setpoint switching configuration in the new format;
heinrichsweikamp
parents: 789
diff changeset
98 text[textPointer++] = '\t';
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
100 if (first == 0 || actual_menu_content != MENU_SURFACE) {
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
101 strcpy(&text[textPointer++],"\177");
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
102 }
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
104 textPointer += snprintf(&text[textPointer], 40, "* %u.%02u\016\016 bar\017\034 \016\016 \017", setpointBar, setpoint_cbar - (100 * setpointBar));
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
105 if (!settings->autoSetpoint || spId < SETPOINT_INDEX_AUTO_DECO) {
792
25103f5c7e29 Avoid a configuration warning after the firmware upgrade by disabling automatic setpoint switching. This makes sure the user's automatic setpoint configuration is not overwritten by the validity checks if the settings are not in the correct spots for the new configuration. Users will have to manually re-create the automatic setpoint switching configuration in the new format;
heinrichsweikamp
parents: 789
diff changeset
106 if (depthUp) {
25103f5c7e29 Avoid a configuration warning after the firmware upgrade by disabling automatic setpoint switching. This makes sure the user's automatic setpoint configuration is not overwritten by the validity checks if the settings are not in the correct spots for the new configuration. Users will have to manually re-create the automatic setpoint switching configuration in the new format;
heinrichsweikamp
parents: 789
diff changeset
107 colour = '\020';
25103f5c7e29 Avoid a configuration warning after the firmware upgrade by disabling automatic setpoint switching. This makes sure the user's automatic setpoint configuration is not overwritten by the validity checks if the settings are not in the correct spots for the new configuration. Users will have to manually re-create the automatic setpoint switching configuration in the new format;
heinrichsweikamp
parents: 789
diff changeset
108 } else {
25103f5c7e29 Avoid a configuration warning after the firmware upgrade by disabling automatic setpoint switching. This makes sure the user's automatic setpoint configuration is not overwritten by the validity checks if the settings are not in the correct spots for the new configuration. Users will have to manually re-create the automatic setpoint switching configuration in the new format;
heinrichsweikamp
parents: 789
diff changeset
109 colour = '\031';
25103f5c7e29 Avoid a configuration warning after the firmware upgrade by disabling automatic setpoint switching. This makes sure the user's automatic setpoint configuration is not overwritten by the validity checks if the settings are not in the correct spots for the new configuration. Users will have to manually re-create the automatic setpoint switching configuration in the new format;
heinrichsweikamp
parents: 789
diff changeset
110 }
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
111
792
25103f5c7e29 Avoid a configuration warning after the firmware upgrade by disabling automatic setpoint switching. This makes sure the user's automatic setpoint configuration is not overwritten by the validity checks if the settings are not in the correct spots for the new configuration. Users will have to manually re-create the automatic setpoint switching configuration in the new format;
heinrichsweikamp
parents: 789
diff changeset
112 textPointer += snprintf(&text[textPointer], 40, "%c%3u\016\016 \035%c%c\017\n\r", colour, unit_depth_integer(depthUp), unit_depth_char1(), unit_depth_char2());
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
113 } else {
792
25103f5c7e29 Avoid a configuration warning after the firmware upgrade by disabling automatic setpoint switching. This makes sure the user's automatic setpoint configuration is not overwritten by the validity checks if the settings are not in the correct spots for the new configuration. Users will have to manually re-create the automatic setpoint switching configuration in the new format;
heinrichsweikamp
parents: 789
diff changeset
114 textPointer += snprintf(&text[textPointer], 14, " %c\016\016 \035%c%c\017\n\r", pSetpointLine[spId].note.ub.active ? '\005' : '\006', TXT_2BYTE, TXT2BYTE_Enabled);
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
115 }
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 650
diff changeset
116 }
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 }
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
118 if (actual_menu_content != MENU_SURFACE) {
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 text[textPointer++] = '\020';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 text[textPointer++] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 text[textPointer++] = TXT2BYTE_UseSensor;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 text[textPointer++] = '\n';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 text[textPointer++] = '\r';
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 650
diff changeset
124
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 650
diff changeset
125
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 650
diff changeset
126 if(stateUsed->diveSettings.diveMode == DIVEMODE_PSCR)
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 650
diff changeset
127 {
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
128 textPointer += snprintf(&text[textPointer], 20,"\020%c", TXT_SimPpo2);
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 650
diff changeset
129 }
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 text[textPointer++] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 }
650
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 525
diff changeset
132 else
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 525
diff changeset
133 {
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 525
diff changeset
134 text[textPointer++] = '\020';
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 525
diff changeset
135 text[textPointer++] = TXT_2BYTE;
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 525
diff changeset
136 text[textPointer++] = TXT2BYTE_AutomaticSP;
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 525
diff changeset
137 text[textPointer++] = '\002';
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 662
diff changeset
138 if (settings->autoSetpoint)
650
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 525
diff changeset
139 text[textPointer++] = '\005';
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 525
diff changeset
140 else
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 525
diff changeset
141 text[textPointer++] = '\006';
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 525
diff changeset
142 text[textPointer++] = 0;
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 525
diff changeset
143 }
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 return StMSP;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 }