Pulled in the latest SystemK (with new BLE). #1
14 changed files with 184 additions and 45 deletions
Binary file not shown.
|
@ -6,14 +6,15 @@
|
||||||
* /_/ |_|/_/ \__,_/\__, / /____/\____/\__,_/_/ \___/\___/ \____/\____/\__,_/\___/
|
* /_/ |_|/_/ \__,_/\__, / /____/\____/\__,_/_/ \___/\___/ \____/\____/\__,_/\___/
|
||||||
* /____/
|
* /____/
|
||||||
*
|
*
|
||||||
* 🃞 THIS FILE IS PART OF THE KTAG SOURCE CODE. Visit https://ktag.clubk.club/ for more. 🃞
|
* This file is part of the KTag project, a DIY laser tag game with customizable features and wide interoperability.
|
||||||
|
* 🛡️ <https://ktag.clubk.club> 🃞
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \file
|
/** \file
|
||||||
* \brief [Autogenerated] This file defines the External EEPROM entries.
|
* \brief [Autogenerated] This file defines the External EEPROM entries.
|
||||||
*
|
*
|
||||||
* \note AUTOGENERATED: This file was generated automatically on Friday, April 28, 2023 at 11:31:31 AM.
|
* \note AUTOGENERATED: This file was generated automatically on Saturday, March 1, 2025 at 08:52:44 AM.
|
||||||
* DO NOT MODIFY THIS FILE MANUALLY!
|
* DO NOT MODIFY THIS FILE MANUALLY!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -102,18 +103,28 @@ static const NVM_Game_Settings_T DEFAULT_Game_Settings =
|
||||||
{
|
{
|
||||||
//! Selected weapon.
|
//! Selected weapon.
|
||||||
.Weapon_ID = LASER_X_ID,
|
.Weapon_ID = LASER_X_ID,
|
||||||
//! Player identification (is this used?)
|
//! Player identification.
|
||||||
.Player_ID = 0,
|
.Player_ID = 0,
|
||||||
//! Selected team.
|
//! Selected team.
|
||||||
.Team_ID = 1,
|
.Team_ID = 1,
|
||||||
|
//! Maximum health.
|
||||||
|
.Max_Health = 100,
|
||||||
|
//! Number of special weapons regained upon reentry to the game.
|
||||||
|
.N_Special_Weapons_On_Reentry = 1,
|
||||||
|
//! Time in milliseconds between instigating a game and when the countdown begins.
|
||||||
|
.T_Start_Game_in_ms = 30000,
|
||||||
|
//! Duration of the game in milliseconds.
|
||||||
|
.T_Game_Length_in_ms = 600000,
|
||||||
|
//! Color representing the player, rather than the team.
|
||||||
|
.Secondary_Color = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
NVM_EEPROMEntry_T NVM_Game_Settings =
|
NVM_EEPROMEntry_T NVM_Game_Settings =
|
||||||
{
|
{
|
||||||
//! Size == sizeof(NVM_Game_Settings_T)
|
//! Size == sizeof(NVM_Game_Settings_T)
|
||||||
.Size = 3,
|
.Size = 17,
|
||||||
.EE_Address = 22,
|
.EE_Address = 22,
|
||||||
.EE_CRC_Address = 25,
|
.EE_CRC_Address = 39,
|
||||||
.Value = (uint8_t *)&RAM_Game_Settings,
|
.Value = (uint8_t *)&RAM_Game_Settings,
|
||||||
.Default = (uint8_t *)&DEFAULT_Game_Settings,
|
.Default = (uint8_t *)&DEFAULT_Game_Settings,
|
||||||
.State = NVM_STATE_UNINITIALIZED
|
.State = NVM_STATE_UNINITIALIZED
|
||||||
|
@ -130,8 +141,8 @@ NVM_EEPROMEntry_T NVM_Hourmeter =
|
||||||
{
|
{
|
||||||
//! Size == sizeof(NVM_Hourmeter_T)
|
//! Size == sizeof(NVM_Hourmeter_T)
|
||||||
.Size = 2,
|
.Size = 2,
|
||||||
.EE_Address = 27,
|
.EE_Address = 41,
|
||||||
.EE_CRC_Address = 29,
|
.EE_CRC_Address = 43,
|
||||||
.Value = (uint8_t *)&RAM_Hourmeter,
|
.Value = (uint8_t *)&RAM_Hourmeter,
|
||||||
.Default = (uint8_t *)&DEFAULT_Hourmeter,
|
.Default = (uint8_t *)&DEFAULT_Hourmeter,
|
||||||
.State = NVM_STATE_UNINITIALIZED
|
.State = NVM_STATE_UNINITIALIZED
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
/** \file
|
/** \file
|
||||||
* \brief [Autogenerated] This file declares the External EEPROM entries.
|
* \brief [Autogenerated] This file declares the External EEPROM entries.
|
||||||
*
|
*
|
||||||
* \note AUTOGENERATED: This file was generated automatically on Friday, April 28, 2023 at 11:31:31 AM.
|
* \note AUTOGENERATED: This file was generated automatically on Saturday, March 1, 2025 at 08:52:44 AM.
|
||||||
* DO NOT MODIFY THIS FILE MANUALLY!
|
* DO NOT MODIFY THIS FILE MANUALLY!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -60,10 +60,20 @@ typedef struct __attribute__((packed))
|
||||||
{
|
{
|
||||||
//! Selected weapon.
|
//! Selected weapon.
|
||||||
uint8_t Weapon_ID;
|
uint8_t Weapon_ID;
|
||||||
//! Player identification (is this used?)
|
//! Player identification.
|
||||||
uint8_t Player_ID;
|
uint8_t Player_ID;
|
||||||
//! Selected team.
|
//! Selected team.
|
||||||
uint8_t Team_ID;
|
uint8_t Team_ID;
|
||||||
|
//! Maximum health.
|
||||||
|
uint8_t Max_Health;
|
||||||
|
//! Number of special weapons regained upon reentry to the game.
|
||||||
|
uint8_t N_Special_Weapons_On_Reentry;
|
||||||
|
//! Time in milliseconds between instigating a game and when the countdown begins.
|
||||||
|
uint32_t T_Start_Game_in_ms;
|
||||||
|
//! Duration of the game in milliseconds.
|
||||||
|
uint32_t T_Game_Length_in_ms;
|
||||||
|
//! Color representing the player, rather than the team.
|
||||||
|
uint32_t Secondary_Color;
|
||||||
} NVM_Game_Settings_T;
|
} NVM_Game_Settings_T;
|
||||||
|
|
||||||
typedef struct __attribute__((packed))
|
typedef struct __attribute__((packed))
|
||||||
|
@ -123,6 +133,21 @@ extern const uint8_t NVM_N_EXTERNAL_EEPROM_ENTRIES;
|
||||||
#define NVM_TEAM_ID (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->Team_ID)
|
#define NVM_TEAM_ID (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->Team_ID)
|
||||||
#define NVM_TEAM_ID_ENTRY_PTR (&NVM_Game_Settings)
|
#define NVM_TEAM_ID_ENTRY_PTR (&NVM_Game_Settings)
|
||||||
|
|
||||||
|
#define NVM_MAX_HEALTH (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->Max_Health)
|
||||||
|
#define NVM_MAX_HEALTH_ENTRY_PTR (&NVM_Game_Settings)
|
||||||
|
|
||||||
|
#define NVM_N_SPECIAL_WEAPONS_ON_REENTRY (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->N_Special_Weapons_On_Reentry)
|
||||||
|
#define NVM_N_SPECIAL_WEAPONS_ON_REENTRY_ENTRY_PTR (&NVM_Game_Settings)
|
||||||
|
|
||||||
|
#define NVM_T_START_GAME_IN_MS (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->T_Start_Game_in_ms)
|
||||||
|
#define NVM_T_START_GAME_IN_MS_ENTRY_PTR (&NVM_Game_Settings)
|
||||||
|
|
||||||
|
#define NVM_T_GAME_LENGTH_IN_MS (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->T_Game_Length_in_ms)
|
||||||
|
#define NVM_T_GAME_LENGTH_IN_MS_ENTRY_PTR (&NVM_Game_Settings)
|
||||||
|
|
||||||
|
#define NVM_SECONDARY_COLOR (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->Secondary_Color)
|
||||||
|
#define NVM_SECONDARY_COLOR_ENTRY_PTR (&NVM_Game_Settings)
|
||||||
|
|
||||||
#define NVM_HOURMETER_STARTUPS (((NVM_Hourmeter_T*)NVM_Hourmeter.Value)->Hourmeter_Startups)
|
#define NVM_HOURMETER_STARTUPS (((NVM_Hourmeter_T*)NVM_Hourmeter.Value)->Hourmeter_Startups)
|
||||||
#define NVM_HOURMETER_STARTUPS_ENTRY_PTR (&NVM_Hourmeter)
|
#define NVM_HOURMETER_STARTUPS_ENTRY_PTR (&NVM_Hourmeter)
|
||||||
|
|
||||||
|
|
|
@ -6,14 +6,15 @@
|
||||||
* /_/ |_|/_/ \__,_/\__, / /____/\____/\__,_/_/ \___/\___/ \____/\____/\__,_/\___/
|
* /_/ |_|/_/ \__,_/\__, / /____/\____/\__,_/_/ \___/\___/ \____/\____/\__,_/\___/
|
||||||
* /____/
|
* /____/
|
||||||
*
|
*
|
||||||
* 🃞 THIS FILE IS PART OF THE KTAG SOURCE CODE. Visit https://ktag.clubk.club/ for more. 🃞
|
* This file is part of the KTag project, a DIY laser tag game with customizable features and wide interoperability.
|
||||||
|
* 🛡️ <https://ktag.clubk.club> 🃞
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \file
|
/** \file
|
||||||
* \brief [Autogenerated] This file defines the OnChip EEPROM entries.
|
* \brief [Autogenerated] This file defines the OnChip EEPROM entries.
|
||||||
*
|
*
|
||||||
* \note AUTOGENERATED: This file was generated automatically on Friday, April 28, 2023 at 11:31:31 AM.
|
* \note AUTOGENERATED: This file was generated automatically on Saturday, March 1, 2025 at 08:52:44 AM.
|
||||||
* DO NOT MODIFY THIS FILE MANUALLY!
|
* DO NOT MODIFY THIS FILE MANUALLY!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
/** \file
|
/** \file
|
||||||
* \brief [Autogenerated] This file declares the OnChip EEPROM entries.
|
* \brief [Autogenerated] This file declares the OnChip EEPROM entries.
|
||||||
*
|
*
|
||||||
* \note AUTOGENERATED: This file was generated automatically on Friday, April 28, 2023 at 11:31:31 AM.
|
* \note AUTOGENERATED: This file was generated automatically on Saturday, March 1, 2025 at 08:52:44 AM.
|
||||||
* DO NOT MODIFY THIS FILE MANUALLY!
|
* DO NOT MODIFY THIS FILE MANUALLY!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,14 @@ SystemKResult_T SETTINGS_get_uint8_t(SystemKSettingID_T id, uint8_t * value)
|
||||||
*value = NVM_WEAPON_ID;
|
*value = NVM_WEAPON_ID;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_MAX_HEALTH:
|
||||||
|
*value = NVM_MAX_HEALTH;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_N_SPECIAL_WEAPONS_ON_REENTRY:
|
||||||
|
*value = NVM_N_SPECIAL_WEAPONS_ON_REENTRY;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
result = SYSTEMK_RESULT_WRONG_DATATYPE;
|
result = SYSTEMK_RESULT_WRONG_DATATYPE;
|
||||||
break;
|
break;
|
||||||
|
@ -67,6 +75,14 @@ SystemKResult_T SETTINGS_set_uint8_t(SystemKSettingID_T id, uint8_t value)
|
||||||
NVM_WEAPON_ID = value;
|
NVM_WEAPON_ID = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_MAX_HEALTH:
|
||||||
|
NVM_MAX_HEALTH = value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_N_SPECIAL_WEAPONS_ON_REENTRY:
|
||||||
|
NVM_N_SPECIAL_WEAPONS_ON_REENTRY = value;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
result = SYSTEMK_RESULT_WRONG_DATATYPE;
|
result = SYSTEMK_RESULT_WRONG_DATATYPE;
|
||||||
break;
|
break;
|
||||||
|
@ -82,7 +98,15 @@ SystemKResult_T SETTINGS_get_uint32_t(SystemKSettingID_T id, uint32_t * value)
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case SYSTEMK_SETTING_T_START_GAME_in_ms:
|
case SYSTEMK_SETTING_T_START_GAME_in_ms:
|
||||||
*value = CONFIG_KTAG_T_DEFAULT_START_GAME_in_ms;
|
*value = NVM_T_START_GAME_IN_MS;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_T_GAME_LENGTH_in_ms:
|
||||||
|
*value = NVM_T_GAME_LENGTH_IN_MS;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_SECONDARY_COLOR:
|
||||||
|
*value = NVM_SECONDARY_COLOR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -100,7 +124,15 @@ SystemKResult_T SETTINGS_set_uint32_t(SystemKSettingID_T id, uint32_t value)
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case SYSTEMK_SETTING_T_START_GAME_in_ms:
|
case SYSTEMK_SETTING_T_START_GAME_in_ms:
|
||||||
result = SYSTEMK_RESULT_NOT_IMPLEMENTED;
|
NVM_T_START_GAME_IN_MS = value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_T_GAME_LENGTH_in_ms:
|
||||||
|
NVM_T_GAME_LENGTH_IN_MS = value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_SECONDARY_COLOR:
|
||||||
|
NVM_SECONDARY_COLOR = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 82ec410264cd43e5dbd1778a1dc51ebf36f2f0b5
|
Subproject commit 47822bbdec20eda1a4c21871c7b4fe17c36bb731
|
|
@ -6,14 +6,15 @@
|
||||||
* /_/ |_|/_/ \__,_/\__, / /____/\____/\__,_/_/ \___/\___/ \____/\____/\__,_/\___/
|
* /_/ |_|/_/ \__,_/\__, / /____/\____/\__,_/_/ \___/\___/ \____/\____/\__,_/\___/
|
||||||
* /____/
|
* /____/
|
||||||
*
|
*
|
||||||
* 🃞 THIS FILE IS PART OF THE KTAG SOURCE CODE. Visit https://ktag.clubk.club/ for more. 🃞
|
* This file is part of the KTag project, a DIY laser tag game with customizable features and wide interoperability.
|
||||||
|
* 🛡️ <https://ktag.clubk.club> 🃞
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \file
|
/** \file
|
||||||
* \brief [Autogenerated] This file defines the External EEPROM entries.
|
* \brief [Autogenerated] This file defines the External EEPROM entries.
|
||||||
*
|
*
|
||||||
* \note AUTOGENERATED: This file was generated automatically on Friday, April 28, 2023 at 11:31:31 AM.
|
* \note AUTOGENERATED: This file was generated automatically on Saturday, March 1, 2025 at 08:52:44 AM.
|
||||||
* DO NOT MODIFY THIS FILE MANUALLY!
|
* DO NOT MODIFY THIS FILE MANUALLY!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -102,18 +103,28 @@ static const NVM_Game_Settings_T DEFAULT_Game_Settings =
|
||||||
{
|
{
|
||||||
//! Selected weapon.
|
//! Selected weapon.
|
||||||
.Weapon_ID = LASER_X_ID,
|
.Weapon_ID = LASER_X_ID,
|
||||||
//! Player identification (is this used?)
|
//! Player identification.
|
||||||
.Player_ID = 0,
|
.Player_ID = 0,
|
||||||
//! Selected team.
|
//! Selected team.
|
||||||
.Team_ID = 1,
|
.Team_ID = 1,
|
||||||
|
//! Maximum health.
|
||||||
|
.Max_Health = 100,
|
||||||
|
//! Number of special weapons regained upon reentry to the game.
|
||||||
|
.N_Special_Weapons_On_Reentry = 1,
|
||||||
|
//! Time in milliseconds between instigating a game and when the countdown begins.
|
||||||
|
.T_Start_Game_in_ms = 30000,
|
||||||
|
//! Duration of the game in milliseconds.
|
||||||
|
.T_Game_Length_in_ms = 600000,
|
||||||
|
//! Color representing the player, rather than the team.
|
||||||
|
.Secondary_Color = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
NVM_EEPROMEntry_T NVM_Game_Settings =
|
NVM_EEPROMEntry_T NVM_Game_Settings =
|
||||||
{
|
{
|
||||||
//! Size == sizeof(NVM_Game_Settings_T)
|
//! Size == sizeof(NVM_Game_Settings_T)
|
||||||
.Size = 3,
|
.Size = 17,
|
||||||
.EE_Address = 22,
|
.EE_Address = 22,
|
||||||
.EE_CRC_Address = 25,
|
.EE_CRC_Address = 39,
|
||||||
.Value = (uint8_t *)&RAM_Game_Settings,
|
.Value = (uint8_t *)&RAM_Game_Settings,
|
||||||
.Default = (uint8_t *)&DEFAULT_Game_Settings,
|
.Default = (uint8_t *)&DEFAULT_Game_Settings,
|
||||||
.State = NVM_STATE_UNINITIALIZED
|
.State = NVM_STATE_UNINITIALIZED
|
||||||
|
@ -130,8 +141,8 @@ NVM_EEPROMEntry_T NVM_Hourmeter =
|
||||||
{
|
{
|
||||||
//! Size == sizeof(NVM_Hourmeter_T)
|
//! Size == sizeof(NVM_Hourmeter_T)
|
||||||
.Size = 2,
|
.Size = 2,
|
||||||
.EE_Address = 27,
|
.EE_Address = 41,
|
||||||
.EE_CRC_Address = 29,
|
.EE_CRC_Address = 43,
|
||||||
.Value = (uint8_t *)&RAM_Hourmeter,
|
.Value = (uint8_t *)&RAM_Hourmeter,
|
||||||
.Default = (uint8_t *)&DEFAULT_Hourmeter,
|
.Default = (uint8_t *)&DEFAULT_Hourmeter,
|
||||||
.State = NVM_STATE_UNINITIALIZED
|
.State = NVM_STATE_UNINITIALIZED
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
/** \file
|
/** \file
|
||||||
* \brief [Autogenerated] This file declares the External EEPROM entries.
|
* \brief [Autogenerated] This file declares the External EEPROM entries.
|
||||||
*
|
*
|
||||||
* \note AUTOGENERATED: This file was generated automatically on Friday, April 28, 2023 at 11:31:31 AM.
|
* \note AUTOGENERATED: This file was generated automatically on Saturday, March 1, 2025 at 08:52:44 AM.
|
||||||
* DO NOT MODIFY THIS FILE MANUALLY!
|
* DO NOT MODIFY THIS FILE MANUALLY!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -60,10 +60,20 @@ typedef struct __attribute__((packed))
|
||||||
{
|
{
|
||||||
//! Selected weapon.
|
//! Selected weapon.
|
||||||
uint8_t Weapon_ID;
|
uint8_t Weapon_ID;
|
||||||
//! Player identification (is this used?)
|
//! Player identification.
|
||||||
uint8_t Player_ID;
|
uint8_t Player_ID;
|
||||||
//! Selected team.
|
//! Selected team.
|
||||||
uint8_t Team_ID;
|
uint8_t Team_ID;
|
||||||
|
//! Maximum health.
|
||||||
|
uint8_t Max_Health;
|
||||||
|
//! Number of special weapons regained upon reentry to the game.
|
||||||
|
uint8_t N_Special_Weapons_On_Reentry;
|
||||||
|
//! Time in milliseconds between instigating a game and when the countdown begins.
|
||||||
|
uint32_t T_Start_Game_in_ms;
|
||||||
|
//! Duration of the game in milliseconds.
|
||||||
|
uint32_t T_Game_Length_in_ms;
|
||||||
|
//! Color representing the player, rather than the team.
|
||||||
|
uint32_t Secondary_Color;
|
||||||
} NVM_Game_Settings_T;
|
} NVM_Game_Settings_T;
|
||||||
|
|
||||||
typedef struct __attribute__((packed))
|
typedef struct __attribute__((packed))
|
||||||
|
@ -123,6 +133,21 @@ extern const uint8_t NVM_N_EXTERNAL_EEPROM_ENTRIES;
|
||||||
#define NVM_TEAM_ID (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->Team_ID)
|
#define NVM_TEAM_ID (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->Team_ID)
|
||||||
#define NVM_TEAM_ID_ENTRY_PTR (&NVM_Game_Settings)
|
#define NVM_TEAM_ID_ENTRY_PTR (&NVM_Game_Settings)
|
||||||
|
|
||||||
|
#define NVM_MAX_HEALTH (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->Max_Health)
|
||||||
|
#define NVM_MAX_HEALTH_ENTRY_PTR (&NVM_Game_Settings)
|
||||||
|
|
||||||
|
#define NVM_N_SPECIAL_WEAPONS_ON_REENTRY (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->N_Special_Weapons_On_Reentry)
|
||||||
|
#define NVM_N_SPECIAL_WEAPONS_ON_REENTRY_ENTRY_PTR (&NVM_Game_Settings)
|
||||||
|
|
||||||
|
#define NVM_T_START_GAME_IN_MS (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->T_Start_Game_in_ms)
|
||||||
|
#define NVM_T_START_GAME_IN_MS_ENTRY_PTR (&NVM_Game_Settings)
|
||||||
|
|
||||||
|
#define NVM_T_GAME_LENGTH_IN_MS (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->T_Game_Length_in_ms)
|
||||||
|
#define NVM_T_GAME_LENGTH_IN_MS_ENTRY_PTR (&NVM_Game_Settings)
|
||||||
|
|
||||||
|
#define NVM_SECONDARY_COLOR (((NVM_Game_Settings_T*)NVM_Game_Settings.Value)->Secondary_Color)
|
||||||
|
#define NVM_SECONDARY_COLOR_ENTRY_PTR (&NVM_Game_Settings)
|
||||||
|
|
||||||
#define NVM_HOURMETER_STARTUPS (((NVM_Hourmeter_T*)NVM_Hourmeter.Value)->Hourmeter_Startups)
|
#define NVM_HOURMETER_STARTUPS (((NVM_Hourmeter_T*)NVM_Hourmeter.Value)->Hourmeter_Startups)
|
||||||
#define NVM_HOURMETER_STARTUPS_ENTRY_PTR (&NVM_Hourmeter)
|
#define NVM_HOURMETER_STARTUPS_ENTRY_PTR (&NVM_Hourmeter)
|
||||||
|
|
||||||
|
|
|
@ -6,14 +6,15 @@
|
||||||
* /_/ |_|/_/ \__,_/\__, / /____/\____/\__,_/_/ \___/\___/ \____/\____/\__,_/\___/
|
* /_/ |_|/_/ \__,_/\__, / /____/\____/\__,_/_/ \___/\___/ \____/\____/\__,_/\___/
|
||||||
* /____/
|
* /____/
|
||||||
*
|
*
|
||||||
* 🃞 THIS FILE IS PART OF THE KTAG SOURCE CODE. Visit https://ktag.clubk.club/ for more. 🃞
|
* This file is part of the KTag project, a DIY laser tag game with customizable features and wide interoperability.
|
||||||
|
* 🛡️ <https://ktag.clubk.club> 🃞
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \file
|
/** \file
|
||||||
* \brief [Autogenerated] This file defines the OnChip EEPROM entries.
|
* \brief [Autogenerated] This file defines the OnChip EEPROM entries.
|
||||||
*
|
*
|
||||||
* \note AUTOGENERATED: This file was generated automatically on Friday, April 28, 2023 at 11:31:31 AM.
|
* \note AUTOGENERATED: This file was generated automatically on Saturday, March 1, 2025 at 08:52:44 AM.
|
||||||
* DO NOT MODIFY THIS FILE MANUALLY!
|
* DO NOT MODIFY THIS FILE MANUALLY!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
/** \file
|
/** \file
|
||||||
* \brief [Autogenerated] This file declares the OnChip EEPROM entries.
|
* \brief [Autogenerated] This file declares the OnChip EEPROM entries.
|
||||||
*
|
*
|
||||||
* \note AUTOGENERATED: This file was generated automatically on Friday, April 28, 2023 at 11:31:31 AM.
|
* \note AUTOGENERATED: This file was generated automatically on Saturday, March 1, 2025 at 08:52:44 AM.
|
||||||
* DO NOT MODIFY THIS FILE MANUALLY!
|
* DO NOT MODIFY THIS FILE MANUALLY!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,14 @@ SystemKResult_T SETTINGS_get_uint8_t(SystemKSettingID_T id, uint8_t * value)
|
||||||
*value = NVM_WEAPON_ID;
|
*value = NVM_WEAPON_ID;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_MAX_HEALTH:
|
||||||
|
*value = NVM_MAX_HEALTH;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_N_SPECIAL_WEAPONS_ON_REENTRY:
|
||||||
|
*value = NVM_N_SPECIAL_WEAPONS_ON_REENTRY;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
result = SYSTEMK_RESULT_WRONG_DATATYPE;
|
result = SYSTEMK_RESULT_WRONG_DATATYPE;
|
||||||
break;
|
break;
|
||||||
|
@ -67,6 +75,14 @@ SystemKResult_T SETTINGS_set_uint8_t(SystemKSettingID_T id, uint8_t value)
|
||||||
NVM_WEAPON_ID = value;
|
NVM_WEAPON_ID = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_MAX_HEALTH:
|
||||||
|
NVM_MAX_HEALTH = value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_N_SPECIAL_WEAPONS_ON_REENTRY:
|
||||||
|
NVM_N_SPECIAL_WEAPONS_ON_REENTRY = value;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
result = SYSTEMK_RESULT_WRONG_DATATYPE;
|
result = SYSTEMK_RESULT_WRONG_DATATYPE;
|
||||||
break;
|
break;
|
||||||
|
@ -82,7 +98,15 @@ SystemKResult_T SETTINGS_get_uint32_t(SystemKSettingID_T id, uint32_t * value)
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case SYSTEMK_SETTING_T_START_GAME_in_ms:
|
case SYSTEMK_SETTING_T_START_GAME_in_ms:
|
||||||
*value = CONFIG_KTAG_T_DEFAULT_START_GAME_in_ms;
|
*value = NVM_T_START_GAME_IN_MS;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_T_GAME_LENGTH_in_ms:
|
||||||
|
*value = NVM_T_GAME_LENGTH_IN_MS;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_SECONDARY_COLOR:
|
||||||
|
*value = NVM_SECONDARY_COLOR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -100,7 +124,15 @@ SystemKResult_T SETTINGS_set_uint32_t(SystemKSettingID_T id, uint32_t value)
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case SYSTEMK_SETTING_T_START_GAME_in_ms:
|
case SYSTEMK_SETTING_T_START_GAME_in_ms:
|
||||||
result = SYSTEMK_RESULT_NOT_IMPLEMENTED;
|
NVM_T_START_GAME_IN_MS = value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_T_GAME_LENGTH_in_ms:
|
||||||
|
NVM_T_GAME_LENGTH_IN_MS = value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SYSTEMK_SETTING_SECONDARY_COLOR:
|
||||||
|
NVM_SECONDARY_COLOR = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 82ec410264cd43e5dbd1778a1dc51ebf36f2f0b5
|
Subproject commit 47822bbdec20eda1a4c21871c7b4fe17c36bb731
|
31
autocode.py
31
autocode.py
|
@ -18,7 +18,7 @@ import openpyxl
|
||||||
|
|
||||||
APP_NAME = "KTag Autocode Generator"
|
APP_NAME = "KTag Autocode Generator"
|
||||||
__author__ = "Joe Kearney"
|
__author__ = "Joe Kearney"
|
||||||
__version__ = "00.02"
|
__version__ = "00.03"
|
||||||
|
|
||||||
NVM_SPREADSHEET_FILENAME = "2020TPC Nonvolatile Memory.xlsx"
|
NVM_SPREADSHEET_FILENAME = "2020TPC Nonvolatile Memory.xlsx"
|
||||||
SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__))
|
SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
@ -164,17 +164,17 @@ def generate_NVM_autocode():
|
||||||
with codecs.open('NVM_' + location + 'EEPROMEntries.h', 'w', "utf-8") as f:
|
with codecs.open('NVM_' + location + 'EEPROMEntries.h', 'w', "utf-8") as f:
|
||||||
f.write("/*\n")
|
f.write("/*\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * __ ________ _____ ______ __ \n")
|
r" * __ ________ _____ ______ __ " + "\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * / //_/_ __/___ _____ _ / ___/____ __ _______________ / ____/___ ____/ /__ \n")
|
r" * / //_/_ __/___ _____ _ / ___/____ __ _______________ / ____/___ ____/ /__ " + "\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * / ,< / / / __ `/ __ `/ \__ \/ __ \/ / / / ___/ ___/ _ \ / / / __ \/ __ / _ \ \n")
|
r" * / ,< / / / __ `/ __ `/ \__ \/ __ \/ / / / ___/ ___/ _ \ / / / __ \/ __ / _ \ " + "\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * / /| | / / / /_/ / /_/ / ___/ / /_/ / /_/ / / / /__/ __/ / /___/ /_/ / /_/ / __/ \n")
|
r" * / /| | / / / /_/ / /_/ / ___/ / /_/ / /_/ / / / /__/ __/ / /___/ /_/ / /_/ / __/ " + "\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * /_/ |_|/_/ \__,_/\__, / /____/\____/\__,_/_/ \___/\___/ \____/\____/\__,_/\___/ \n")
|
r" * /_/ |_|/_/ \__,_/\__, / /____/\____/\__,_/_/ \___/\___/ \____/\____/\__,_/\___/ " + "\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * /____/ \n")
|
r" * /____/ " + "\n")
|
||||||
f.write(" *\n")
|
f.write(" *\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * 🃞 THIS FILE IS PART OF THE KTAG SOURCE CODE. Visit https://ktag.clubk.club/ for more. 🃞\n")
|
" * 🃞 THIS FILE IS PART OF THE KTAG SOURCE CODE. Visit https://ktag.clubk.club/ for more. 🃞\n")
|
||||||
|
@ -259,20 +259,21 @@ def generate_NVM_autocode():
|
||||||
with codecs.open('NVM_' + location + 'EEPROMEntries.c', 'w', "utf-8") as f:
|
with codecs.open('NVM_' + location + 'EEPROMEntries.c', 'w', "utf-8") as f:
|
||||||
f.write("/*\n")
|
f.write("/*\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * __ ________ _____ ______ __ \n")
|
r" * __ ________ _____ ______ __ " + "\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * / //_/_ __/___ _____ _ / ___/____ __ _______________ / ____/___ ____/ /__ \n")
|
r" * / //_/_ __/___ _____ _ / ___/____ __ _______________ / ____/___ ____/ /__ " + "\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * / ,< / / / __ `/ __ `/ \__ \/ __ \/ / / / ___/ ___/ _ \ / / / __ \/ __ / _ \ \n")
|
r" * / ,< / / / __ `/ __ `/ \__ \/ __ \/ / / / ___/ ___/ _ \ / / / __ \/ __ / _ \ " + "\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * / /| | / / / /_/ / /_/ / ___/ / /_/ / /_/ / / / /__/ __/ / /___/ /_/ / /_/ / __/ \n")
|
r" * / /| | / / / /_/ / /_/ / ___/ / /_/ / /_/ / / / /__/ __/ / /___/ /_/ / /_/ / __/ " + "\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * /_/ |_|/_/ \__,_/\__, / /____/\____/\__,_/_/ \___/\___/ \____/\____/\__,_/\___/ \n")
|
r" * /_/ |_|/_/ \__,_/\__, / /____/\____/\__,_/_/ \___/\___/ \____/\____/\__,_/\___/ " + "\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * /____/ \n")
|
r" * /____/ " + "\n")
|
||||||
f.write(" *\n")
|
f.write(" *\n")
|
||||||
|
f.write(" * This file is part of the KTag project, a DIY laser tag game with customizable features and wide interoperability.\n")
|
||||||
f.write(
|
f.write(
|
||||||
" * 🃞 THIS FILE IS PART OF THE KTAG SOURCE CODE. Visit https://ktag.clubk.club/ for more. 🃞\n")
|
" * 🛡️ <https://ktag.clubk.club> 🃞\n")
|
||||||
f.write(" *\n")
|
f.write(" *\n")
|
||||||
f.write(" */\n")
|
f.write(" */\n")
|
||||||
|
|
||||||
|
@ -294,7 +295,7 @@ def generate_NVM_autocode():
|
||||||
f.write('\n')
|
f.write('\n')
|
||||||
f.write('/* EEPROM Entries */\n')
|
f.write('/* EEPROM Entries */\n')
|
||||||
f.write('\n')
|
f.write('\n')
|
||||||
f.write('/** \defgroup NVM_' + location.upper() +
|
f.write(r'/** \defgroup NVM_' + location.upper() +
|
||||||
'_EEPROM NVM ' + location + ' EEPROM\n')
|
'_EEPROM NVM ' + location + ' EEPROM\n')
|
||||||
f.write(' *\n')
|
f.write(' *\n')
|
||||||
f.write(' * The ' + location +
|
f.write(' * The ' + location +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue