Skip to content

Commit

Permalink
regenerate for FIT-SDK v21.89
Browse files Browse the repository at this point in the history
  • Loading branch information
sportlog committed Sep 22, 2022
1 parent 2468400 commit 26b1244
Show file tree
Hide file tree
Showing 258 changed files with 986 additions and 428 deletions.
15 changes: 4 additions & 11 deletions config/MessageGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,10 @@

use DateTime;
use Exception;
use Sportlog\FIT\Profile\Field;
use Sportlog\FIT\Profile\Message;
use Sportlog\FIT\Profile\ProfileType;
use Sportlog\FIT\FitBaseType;
use Nette\PhpGenerator\Literal;
use Nette\PhpGenerator\PhpFile;
use Nette\PhpGenerator\ClassType;
use Nette\PhpGenerator\PsrPrinter;
use Nette\PhpGenerator\Type;
use Nette\PhpGenerator\{ClassType, Literal, PhpFile, PsrPrinter, Type};
use ReflectionClass;
use Sportlog\FIT\Profile\Types\MesgNum;
use Sportlog\FIT\FitBaseType;
use Sportlog\FIT\Profile\{Types\MesgNum, Field, Message, ProfileType};

/**
* A quick & dirty, hacky, ugly generator for all messages defined
Expand All @@ -35,7 +28,7 @@ class MessageGenerator
/**
* FIT-SDK Version
*/
const FIT_SDK_VERSION = '21.78';
const FIT_SDK_VERSION = '21.89';
const MESSAGE_START = "Mesg newMesg = new Mesg(";
const FIELD_START = "newMesg.SetField(new Field(";
const MESSAGE_END = "return newMesg";
Expand Down
309 changes: 203 additions & 106 deletions config/Profile.cs

Large diffs are not rendered by default.

92 changes: 66 additions & 26 deletions config/Profile.csv
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ file,enum,,,
,,activity_summary,20,"Read/erase, multiple files. Directory=Activities"
,,monitoring_daily,28,
,,monitoring_b,32,Read only. Directory=Monitoring. File number=identifier
,,segment,34,Read/write/erase. Multiple Files. Directory=Segments
,,segment_list,35,Read/write/erase. Single File. Directory=Segments
,,segment,34,Read/write/erase. Multiple Files. Directory=Segments
,,segment_list,35,Read/write/erase. Single File. Directory=Segments
,,exd_configuration,40,Read/write/erase. Single File. Directory=Settings
,,mfg_range_min,0xF7,0xF7 - 0xFE reserved for manufacturer specific file types
,,mfg_range_max,0xFE,0xF7 - 0xFE reserved for manufacturer specific file types
Expand Down Expand Up @@ -114,7 +114,7 @@ mesg_num,uint16,,,
,,mfg_range_max,0xFFFE,0xFF00 - 0xFFFE reserved for manufacturer specific messages
checksum,uint8,,,
,,clear,0,Allows clear of checksum for flash memory where can only write 1 to 0 without erasing sector.
,,ok,1,Set to mark checksum as valid if computes to invalid values 0 or 0xFF. Checksum can also be set to ok to save encoding computation time.
,,ok,1,Set to mark checksum as valid if computes to invalid values 0 or 0xFF. Checksum can also be set to ok to save encoding computation time.
file_flags,uint8z,,,
,,read,0x02,
,,write,0x04,
Expand All @@ -136,7 +136,6 @@ device_index,uint8,,,
gender,enum,,,
,,female,0,
,,male,1,
,,unspecified,2,
language,enum,,,
,,english,0,
,,french,1,
Expand Down Expand Up @@ -625,31 +624,31 @@ date_mode,enum,,,
backlight_timeout,uint8,,,Timeout in seconds.
,,infinite,0,Backlight stays on forever.
event,enum,,,
,,timer,0,Group 0. Start / stop_all
,,timer,0,Group 0. Start / stop_all
,,workout,3,start / stop
,,workout_step,4,Start at beginning of workout. Stop at end of each step.
,,workout_step,4,Start at beginning of workout. Stop at end of each step.
,,power_down,5,stop_all group 0
,,power_up,6,stop_all group 0
,,off_course,7,start / stop group 0
,,session,8,Stop at end of each session.
,,lap,9,Stop at end of each lap.
,,course_point,10,marker
,,battery,11,marker
,,virtual_partner_pace,12,"Group 1. Start at beginning of activity if VP enabled, when VP pace is changed during activity or VP enabled mid activity. stop_disable when VP disabled."
,,hr_high_alert,13,Group 0. Start / stop when in alert condition.
,,hr_low_alert,14,Group 0. Start / stop when in alert condition.
,,speed_high_alert,15,Group 0. Start / stop when in alert condition.
,,speed_low_alert,16,Group 0. Start / stop when in alert condition.
,,cad_high_alert,17,Group 0. Start / stop when in alert condition.
,,cad_low_alert,18,Group 0. Start / stop when in alert condition.
,,power_high_alert,19,Group 0. Start / stop when in alert condition.
,,power_low_alert,20,Group 0. Start / stop when in alert condition.
,,virtual_partner_pace,12,"Group 1. Start at beginning of activity if VP enabled, when VP pace is changed during activity or VP enabled mid activity. stop_disable when VP disabled."
,,hr_high_alert,13,Group 0. Start / stop when in alert condition.
,,hr_low_alert,14,Group 0. Start / stop when in alert condition.
,,speed_high_alert,15,Group 0. Start / stop when in alert condition.
,,speed_low_alert,16,Group 0. Start / stop when in alert condition.
,,cad_high_alert,17,Group 0. Start / stop when in alert condition.
,,cad_low_alert,18,Group 0. Start / stop when in alert condition.
,,power_high_alert,19,Group 0. Start / stop when in alert condition.
,,power_low_alert,20,Group 0. Start / stop when in alert condition.
,,recovery_hr,21,marker
,,battery_low,22,marker
,,time_duration_alert,23,Group 1. Start if enabled mid activity (not required at start of activity). Stop when duration is reached. stop_disable if disabled.
,,distance_duration_alert,24,Group 1. Start if enabled mid activity (not required at start of activity). Stop when duration is reached. stop_disable if disabled.
,,calorie_duration_alert,25,Group 1. Start if enabled mid activity (not required at start of activity). Stop when duration is reached. stop_disable if disabled.
,,activity,26,Group 1.. Stop at end of activity.
,,time_duration_alert,23,Group 1. Start if enabled mid activity (not required at start of activity). Stop when duration is reached. stop_disable if disabled.
,,distance_duration_alert,24,Group 1. Start if enabled mid activity (not required at start of activity). Stop when duration is reached. stop_disable if disabled.
,,calorie_duration_alert,25,Group 1. Start if enabled mid activity (not required at start of activity). Stop when duration is reached. stop_disable if disabled.
,,activity,26,Group 1.. Stop at end of activity.
,,fitness_equipment,27,marker
,,length,28,Stop at end of each length.
,,user_marker,32,marker
Expand All @@ -658,8 +657,8 @@ event,enum,,,
,,front_gear_change,42,marker
,,rear_gear_change,43,marker
,,rider_position_change,44,marker
,,elev_high_alert,45,Group 0. Start / stop when in alert condition.
,,elev_low_alert,46,Group 0. Start / stop when in alert condition.
,,elev_high_alert,45,Group 0. Start / stop when in alert condition.
,,elev_low_alert,46,Group 0. Start / stop when in alert condition.
,,comm_timeout,47,marker
,,radar_threat_alert,75,start/stop/marker
event_type,enum,,,
Expand Down Expand Up @@ -799,9 +798,36 @@ course_point,enum,,,
,,u_turn,23,
,,segment_start,24,
,,segment_end,25,
,,campsite,27,
,,aid_station,28,
,,rest_area,29,
,,general_distance,30,Used with UpAhead
,,service,31,
,,energy_gel,32,
,,sports_drink,33,
,,mile_marker,34,
,,checkpoint,35,
,,shelter,36,
,,meeting_spot,37,
,,overlook,38,
,,toilet,39,
,,shower,40,
,,gear,41,
,,sharp_curve,42,
,,steep_incline,43,
,,tunnel,44,
,,bridge,45,
,,obstacle,46,
,,crossing,47,
,,store,48,
,,transition,49,
,,navaid,50,
,,transport,51,
,,alert,52,
,,info,53,
manufacturer,uint16,,,
,,garmin,1,
,,garmin_fr405_antfs,2,Do not use. Used by FR405 for ANTFS man id.
,,garmin_fr405_antfs,2,Do not use. Used by FR405 for ANTFS man id.
,,zephyr,3,
,,dayton,4,
,,idt,5,
Expand Down Expand Up @@ -939,6 +965,9 @@ manufacturer,uint16,,,
,,kinetic_sports,139,
,,decathlon_byte,140,
,,tq_systems,141,
,,tag_heuer,142,
,,keiser_fitness,143,
,,zwift_byte,144,
,,development,255,
,,healthandlife,257,
,,lezyne,258,
Expand Down Expand Up @@ -1001,6 +1030,8 @@ manufacturer,uint16,,,
,,RGT_cycling,315,
,,vasa,316,
,,race_republic,317,
,,fazua,318,
,,oreka_training,319,
,,actigraphcorp,5759,
garmin_product,uint16,,,
,,hrm1,1,
Expand Down Expand Up @@ -1355,14 +1386,22 @@ garmin_product,uint16,,,
,,venu2_asia,3950,
,,fr945_lte_asia,3978,
,,approach_S12_asia,3986,
,,fr255_music,3990,
,,fr255_small_music,3991,
,,fr255,3992,
,,fr255_small,3993,
,,approach_g12_asia, 4001,
,,approach_s42_asia,4002,
,,descent_g1,4005,
,,venu2_plus_asia,4017,
,,fr955,4024,
,,fr55_asia,4033,
,,vivosmart_5,4063,
,,instinct_2_asia,4071,
,,d2_air_x10,4125,
,,hrm_pro_plus,4130,
,,descent_g1_asia,4132,
,,edge_explore2,4169,
,,tacx_neo_smart,4265,"Neo Smart, Tacx"
,,tacx_neo2_smart,4266,"Neo 2 Smart, Tacx"
,,tacx_neo2_t_smart,4267,"Neo 2T Smart, Tacx"
Expand All @@ -1371,10 +1410,11 @@ garmin_product,uint16,,,
,,tacx_flow_smart,4270,"Flow Smart, Tacx"
,,tacx_vortex_smart,4271,"Vortex Smart, Tacx"
,,tacx_bushido_smart,4272,"Bushido Smart, Tacx"
,,tacx_genius_smart,4273,"Genius Smart, Tacx "
,,tacx_genius_smart,4273,"Genius Smart, Tacx"
,,tacx_flux_flux_s_smart,4274,"Flux/Flux S Smart, Tacx"
,,tacx_flux2_smart,4275,"Flux 2 Smart, Tacx"
,,tacx_magnum,4276,"Magnum, Tacx"
,,tactix7,4135,
,,sdm4,10007,SDM4 footpod
,,edge_remote,10014,
,,tacx_training_app_win,20533,
Expand Down Expand Up @@ -1424,7 +1464,7 @@ workout_capabilities,uint32z,,,
,,fitness_equipment,0x00000004,
,,firstbeat,0x00000008,
,,new_leaf,0x00000010,
,,tcx,0x00000020,For backwards compatibility. Watch should add missing id fields then clear flag.
,,tcx,0x00000020,For backwards compatibility. Watch should add missing id fields then clear flag.
,,speed,0x00000080,Speed source required for workout step.
,,heart_rate,0x00000100,Heart rate source required for workout step.
,,distance,0x00000200,Distance source required for workout step.
Expand Down Expand Up @@ -3484,8 +3524,8 @@ dive_gas_status,enum,,,
,,enabled,1,
,,backup_only,2,
dive_alarm_type,enum,,,
,,depth,0,
,,time,1,
,,depth,0,Alarm when a certain depth is crossed
,,time,1,Alarm when a certain time has transpired
dive_backlight_mode,enum,,,
,,at_depth,0,
,,always_on,1,
Expand Down
12 changes: 7 additions & 5 deletions src/Profile/MessageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license MIT License
*
* ****WARNING**** This file is auto-generated! Do NOT edit.
* Profile Version = 21.78Release
* Profile Version = 21.89Release
*/

declare(strict_types=1);
Expand All @@ -30,6 +30,7 @@
use Sportlog\FIT\Profile\Messages\CourseMessage;
use Sportlog\FIT\Profile\Messages\CoursePointMessage;
use Sportlog\FIT\Profile\Messages\DeveloperDataIdMessage;
use Sportlog\FIT\Profile\Messages\DeviceAuxBatteryInfoMessage;
use Sportlog\FIT\Profile\Messages\DeviceInfoMessage;
use Sportlog\FIT\Profile\Messages\DeviceSettingsMessage;
use Sportlog\FIT\Profile\Messages\DiveAlarmMessage;
Expand Down Expand Up @@ -150,8 +151,8 @@ public static function createMessage(int $globalMessageNumber): Message
MesgNum::RECORD => new RecordMessage(),
MesgNum::EVENT => new EventMessage(),
MesgNum::DEVICE_INFO => new DeviceInfoMessage(),
MesgNum::DEVICE_AUX_BATTERY_INFO => new DeviceAuxBatteryInfoMessage(),
MesgNum::TRAINING_FILE => new TrainingFileMessage(),
MesgNum::HRV => new HrvMessage(),
MesgNum::WEATHER_CONDITIONS => new WeatherConditionsMessage(),
MesgNum::WEATHER_ALERT => new WeatherAlertMessage(),
MesgNum::GPS_METADATA => new GpsMetadataMessage(),
Expand All @@ -172,6 +173,9 @@ public static function createMessage(int $globalMessageNumber): Message
MesgNum::VIDEO_CLIP => new VideoClipMessage(),
MesgNum::SET => new SetMessage(),
MesgNum::JUMP => new JumpMessage(),
MesgNum::CLIMB_PRO => new ClimbProMessage(),
MesgNum::FIELD_DESCRIPTION => new FieldDescriptionMessage(),
MesgNum::DEVELOPER_DATA_ID => new DeveloperDataIdMessage(),
MesgNum::COURSE => new CourseMessage(),
MesgNum::COURSE_POINT => new CoursePointMessage(),
MesgNum::SEGMENT_ID => new SegmentIdMessage(),
Expand All @@ -198,10 +202,8 @@ public static function createMessage(int $globalMessageNumber): Message
MesgNum::EXD_SCREEN_CONFIGURATION => new ExdScreenConfigurationMessage(),
MesgNum::EXD_DATA_FIELD_CONFIGURATION => new ExdDataFieldConfigurationMessage(),
MesgNum::EXD_DATA_CONCEPT_CONFIGURATION => new ExdDataConceptConfigurationMessage(),
MesgNum::FIELD_DESCRIPTION => new FieldDescriptionMessage(),
MesgNum::DEVELOPER_DATA_ID => new DeveloperDataIdMessage(),
MesgNum::DIVE_SUMMARY => new DiveSummaryMessage(),
MesgNum::CLIMB_PRO => new ClimbProMessage(),
MesgNum::HRV => new HrvMessage(),
MesgNum::PAD => new PadMessage(),
default => new InvalidMessage()
};
Expand Down
2 changes: 1 addition & 1 deletion src/Profile/Messages/AccelerometerDataMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license MIT License
*
* ****WARNING**** This file is auto-generated! Do NOT edit.
* Profile Version = 21.78Release
* Profile Version = 21.89Release
*/

declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Profile/Messages/ActivityMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license MIT License
*
* ****WARNING**** This file is auto-generated! Do NOT edit.
* Profile Version = 21.78Release
* Profile Version = 21.89Release
*/

declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Profile/Messages/AntChannelIdMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license MIT License
*
* ****WARNING**** This file is auto-generated! Do NOT edit.
* Profile Version = 21.78Release
* Profile Version = 21.89Release
*/

declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Profile/Messages/AntRxMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license MIT License
*
* ****WARNING**** This file is auto-generated! Do NOT edit.
* Profile Version = 21.78Release
* Profile Version = 21.89Release
*/

declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Profile/Messages/AntTxMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license MIT License
*
* ****WARNING**** This file is auto-generated! Do NOT edit.
* Profile Version = 21.78Release
* Profile Version = 21.89Release
*/

declare(strict_types=1);
Expand Down
35 changes: 31 additions & 4 deletions src/Profile/Messages/AviationAttitudeMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license MIT License
*
* ****WARNING**** This file is auto-generated! Do NOT edit.
* Profile Version = 21.78Release
* Profile Version = 21.89Release
*/

declare(strict_types=1);
Expand All @@ -26,14 +26,41 @@
#[Field('Timestamp', 253, FitBaseType::UINT32, 1.0, 0.0, 's', false, ProfileType::DATETIME)]
#[Field('TimestampMs', 0, FitBaseType::UINT16, 1.0, 0.0, 'ms', false, ProfileType::UINT16)]
#[Field('SystemTime', 1, FitBaseType::UINT32, 1.0, 0.0, 'ms', false, ProfileType::UINT32)]
#[Field('Pitch', 2, FitBaseType::SINT16, 10430.38, 0.0, 'radians', false, ProfileType::SINT16)]
#[Field('Roll', 3, FitBaseType::SINT16, 10430.38, 0.0, 'radians', false, ProfileType::SINT16)]
#[Field(
'Pitch',
2,
FitBaseType::SINT16,
10430.379999999999199644662439823150634765625,
0.0,
'radians',
false,
ProfileType::SINT16
)]
#[Field(
'Roll',
3,
FitBaseType::SINT16,
10430.379999999999199644662439823150634765625,
0.0,
'radians',
false,
ProfileType::SINT16
)]
#[Field('AccelLateral', 4, FitBaseType::SINT16, 100.0, 0.0, 'm/s^2', false, ProfileType::SINT16)]
#[Field('AccelNormal', 5, FitBaseType::SINT16, 100.0, 0.0, 'm/s^2', false, ProfileType::SINT16)]
#[Field('TurnRate', 6, FitBaseType::SINT16, 1024.0, 0.0, 'radians/second', false, ProfileType::SINT16)]
#[Field('Stage', 7, FitBaseType::ENUM, 1.0, 0.0, '', false, ProfileType::ATTITUDESTAGE)]
#[Field('AttitudeStageComplete', 8, FitBaseType::UINT8, 1.0, 0.0, '%', false, ProfileType::UINT8)]
#[Field('Track', 9, FitBaseType::UINT16, 10430.38, 0.0, 'radians', false, ProfileType::UINT16)]
#[Field(
'Track',
9,
FitBaseType::UINT16,
10430.379999999999199644662439823150634765625,
0.0,
'radians',
false,
ProfileType::UINT16
)]
#[Field('Validity', 10, FitBaseType::UINT16, 1.0, 0.0, '', false, ProfileType::ATTITUDEVALIDITY)]
final class AviationAttitudeMessage extends Message
{
Expand Down
2 changes: 1 addition & 1 deletion src/Profile/Messages/BarometerDataMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license MIT License
*
* ****WARNING**** This file is auto-generated! Do NOT edit.
* Profile Version = 21.78Release
* Profile Version = 21.89Release
*/

declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Profile/Messages/BikeProfileMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license MIT License
*
* ****WARNING**** This file is auto-generated! Do NOT edit.
* Profile Version = 21.78Release
* Profile Version = 21.89Release
*/

declare(strict_types=1);
Expand Down
Loading

0 comments on commit 26b1244

Please sign in to comment.