@@ -28,10 +28,12 @@ namespace fffb
2828
2929constexpr uti::u32_t Logitech_VendorID { 0x0000046d } ;
3030constexpr uti::u32_t Logitech_G923_PS_DeviceID { 0xc266046d } ;
31+ constexpr uti::u32_t Logitech_G29_PS4_DeviceID { 0xc24f046d } ;
3132
32- constexpr uti::array< uti::u32_t , 1 > known_wheel_device_ids
33+ constexpr uti::array< uti::u32_t , 2 > known_wheel_device_ids
3334{
3435 Logitech_G923_PS_DeviceID,
36+ Logitech_G29_PS4_DeviceID,
3537} ;
3638
3739// //////////////////////////////////////////////////////////////////////////////
@@ -152,6 +154,8 @@ public:
152154 static constexpr report play_force ( ffb_protocol const protocol, uti::u8_t slots ) noexcept ;
153155 static constexpr report refresh_force ( ffb_protocol const protocol, force const & f ) noexcept ;
154156 static constexpr report stop_force ( ffb_protocol const protocol, uti::u8_t slots ) noexcept ;
157+
158+ static constexpr vector< report > init_sequence ( ffb_protocol const protocol, uti::u32_t device_id ) noexcept ;
155159private:
156160 static constexpr report _constant_force ( ffb_protocol const protocol, force const & force ) noexcept ;
157161 static constexpr report _spring_force ( ffb_protocol const protocol, force const & force ) noexcept ;
@@ -328,6 +332,27 @@ constexpr report protocol::stop_force ( ffb_protocol const protocol, uti::u8_t s
328332 }
329333}
330334
335+ constexpr vector< report > protocol::init_sequence ( ffb_protocol const protocol, uti::u32_t device_id ) noexcept
336+ {
337+ vector< report > reports ;
338+
339+ if ( protocol == ffb_protocol::logitech_classic )
340+ {
341+ switch ( device_id )
342+ {
343+ case Logitech_G923_PS_DeviceID:
344+ reports.push_back ( { 0x30 , 0xf8 , 0x09 , 0x05 , 0x01 } ) ;
345+ break ;
346+ case Logitech_G29_PS4_DeviceID:
347+ reports.push_back ( { 0x30 , 0xf8 , 0x09 , 0x05 , 0x01 } ) ;
348+ break ;
349+ default :
350+ FFFB_F_ERR_S ( " protocol::init_sequence" , " unknown device id" ) ;
351+ }
352+ }
353+ return reports ;
354+ }
355+
331356constexpr report protocol::_constant_force ( ffb_protocol const protocol, force const & f ) noexcept
332357{
333358 uti::u8_t command = f.params .slot << 4 ;
0 commit comments