Skip to content

Commit

Permalink
fixup! コントローラーアイコンのグリップカラーを変更する
Browse files Browse the repository at this point in the history
  • Loading branch information
jiikko committed Jan 4, 2024
1 parent baf9d3d commit b223a7b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/procon_bypass_man/device_connection/pre_bypass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ def run_once
if(first_data_part = raw_data[0].unpack1("H*"))
sub_command = raw_data[15..16].unpack1("H*")
if first_data_part == '21' && sub_command == "5060" # Controller Color
new_color_bytes = ['bc114 275a928 ffffff ffffff ff'.gsub(" ", "")].pack('H*') # new color
new_color_bytes = ['bc 11 42, 75 a9 28, ff ff ff, ff ff ff'.gsub(/[,\s]/, "")].pack('H*') # new color

# 216f81008000911870a547710490105060 00 00 0d, 32 32 32, ff ff ff, ff ff ff, ff ff f
# 216f81008000911870a547710490105060 00 00 0d, 32 32 32, ff ff ff, ff ff ff, ff ff f
# 210781008000f8d77a22c87b0c9010, 5060, 000010,bc11,4275a928ffffffffffffff00000000000000000000000000000000000000000000000000000000000000
# 216f81008000911870a54771049010, 5060, 00000d,3232,32ffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000
raw_data[20..(20+12)] = new_color_bytes
raw_data[17...(17+12)] = new_color_bytes
# raw_data.unpack1("H*")
end
end
Expand Down

0 comments on commit b223a7b

Please sign in to comment.