This commit is contained in:
wu58430 2023-12-04 19:43:28 +08:00
parent d54e89d477
commit 59a4f07e8d
3 changed files with 21 additions and 7 deletions

View file

@ -21,9 +21,7 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="MDC RX"> <list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="MDC RX">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/menu.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/menu.c" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/menu.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/menu.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ui/menu.c" beforeDir="false" afterPath="$PROJECT_DIR$/ui/menu.c" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -130,7 +128,7 @@
<workItem from="1701413653518" duration="3544000" /> <workItem from="1701413653518" duration="3544000" />
<workItem from="1701430185864" duration="10115000" /> <workItem from="1701430185864" duration="10115000" />
<workItem from="1701559895523" duration="22519000" /> <workItem from="1701559895523" duration="22519000" />
<workItem from="1701678199532" duration="10438000" /> <workItem from="1701678199532" duration="10851000" />
</task> </task>
<task id="LOCAL-00001" summary="bug fix"> <task id="LOCAL-00001" summary="bug fix">
<created>1701136012311</created> <created>1701136012311</created>
@ -384,7 +382,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1701687970236</updated> <updated>1701687970236</updated>
</task> </task>
<option name="localTasksCounter" value="37" /> <task id="LOCAL-00037" summary="MDC RX">
<created>1701689801897</created>
<option name="number" value="00037" />
<option name="presentableId" value="LOCAL-00037" />
<option name="project" value="LOCAL" />
<updated>1701689801897</updated>
</task>
<option name="localTasksCounter" value="38" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">

View file

@ -569,7 +569,7 @@ uint16_t extractHex(const char *str) {
} else if (c >= 'A' && c <= 'F') { } else if (c >= 'A' && c <= 'F') {
result = (result << 4) | (c - 'A' + 10); result = (result << 4) | (c - 'A' + 10);
} else { } else {
break; // 遇到非十六进制字符,停止解析 continue; // 遇到非十六进制字符,停止解析
} }
} }
return result; return result;

View file

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#include "app/mdc1200.h"
#include <string.h> #include <string.h>
#include "driver/uart.h" #include "driver/uart.h"
#if !defined(ENABLE_OVERLAY) #if !defined(ENABLE_OVERLAY)
@ -503,7 +503,16 @@ void MENU_AcceptSetting(void)
gVfoConfigureMode = VFO_CONFIGURE_RELOAD; gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
gFlagResetVfos = true; gFlagResetVfos = true;
return; return;
#ifdef ENABLE_MDC1200
case MENU_MDC_ID:
for (int i = 4; i >= 0; i--) {
if (edit[i] != ' ' && edit[i] != '_' && edit[i] != 0x00 && edit[i] != 0xff)
break;
edit[i] = ' ';
}
gEeprom.MDC1200_ID=extractHex(edit);
return;
#endif
case MENU_MEM_NAME: case MENU_MEM_NAME:
// trailing trim // trailing trim
for (int i = 9; i >= 0; i--) { for (int i = 9; i >= 0; i--) {