001/* 002 * Copyright (C) Cross The Road Electronics. All rights reserved. 003 * License information can be found in CTRE_LICENSE.txt 004 * For support and suggestions contact support@ctr-electronics.com or file 005 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases 006 */ 007package com.ctre.phoenix6.configs; 008 009import com.ctre.phoenix6.StatusCode; 010import com.ctre.phoenix6.configs.jni.ConfigJNI; 011import com.ctre.phoenix6.spns.*; 012import com.ctre.phoenix6.signals.*; 013import com.ctre.phoenix6.hardware.core.CoreTalonFX; 014import com.ctre.phoenix6.hardware.core.CoreCANcoder; 015 016/** 017 * Configs that change how the motor controller behaves under 018 * different limit switch states. 019 * <p> 020 * Includes configs such as enabling limit switches, configuring the 021 * remote sensor ID, the source, and the position to set on limit. 022 */ 023public class HardwareLimitSwitchConfigs implements ParentConfiguration 024{ 025 /** 026 * Determines if the forward limit switch is normally-open (default) 027 * or normally-closed. 028 * 029 */ 030 public ForwardLimitTypeValue ForwardLimitType = ForwardLimitTypeValue.NormallyOpen; 031 /** 032 * If enabled, the position is automatically set to a specific value, 033 * specified by ForwardLimitAutosetPositionValue, when the forward 034 * limit switch is asserted. 035 * 036 * <ul> 037 * <li> <b>Default Value:</b> False 038 * </ul> 039 */ 040 public boolean ForwardLimitAutosetPositionEnable = false; 041 /** 042 * The value to automatically set the position to when the forward 043 * limit switch is asserted. This has no effect if 044 * ForwardLimitAutosetPositionEnable is false. 045 * 046 * <ul> 047 * <li> <b>Minimum Value:</b> -3.4e+38 048 * <li> <b>Maximum Value:</b> 3.4e+38 049 * <li> <b>Default Value:</b> 0 050 * <li> <b>Units:</b> rotations 051 * </ul> 052 */ 053 public double ForwardLimitAutosetPositionValue = 0; 054 /** 055 * If enabled, motor output is set to neutral when the forward limit 056 * switch is asserted and positive output is requested. 057 * 058 * <ul> 059 * <li> <b>Default Value:</b> True 060 * </ul> 061 */ 062 public boolean ForwardLimitEnable = true; 063 /** 064 * Determines where to poll the forward limit switch. This defaults 065 * to the forward limit switch pin on the limit switch connector. 066 * <p> 067 * Choose RemoteTalonFX to use the forward limit switch attached to 068 * another Talon FX on the same CAN bus (this also requires setting 069 * ForwardLimitRemoteSensorID). 070 * <p> 071 * Choose RemoteCANifier to use the forward limit switch attached to 072 * another CANifier on the same CAN bus (this also requires setting 073 * ForwardLimitRemoteSensorID). 074 * <p> 075 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus 076 * (this also requires setting ForwardLimitRemoteSensorID). The 077 * forward limit will assert when the CANcoder magnet strength changes 078 * from BAD (red) to ADEQUATE (orange) or GOOD (green). 079 * 080 */ 081 public ForwardLimitSourceValue ForwardLimitSource = ForwardLimitSourceValue.LimitSwitchPin; 082 /** 083 * Device ID of the remote device if using remote limit switch 084 * features for the forward limit switch. 085 * 086 * <ul> 087 * <li> <b>Minimum Value:</b> 0 088 * <li> <b>Maximum Value:</b> 62 089 * <li> <b>Default Value:</b> 0 090 * <li> <b>Units:</b> 091 * </ul> 092 */ 093 public int ForwardLimitRemoteSensorID = 0; 094 /** 095 * Determines if the reverse limit switch is normally-open (default) 096 * or normally-closed. 097 * 098 */ 099 public ReverseLimitTypeValue ReverseLimitType = ReverseLimitTypeValue.NormallyOpen; 100 /** 101 * If enabled, the position is automatically set to a specific value, 102 * specified by ReverseLimitAutosetPositionValue, when the reverse 103 * limit switch is asserted. 104 * 105 * <ul> 106 * <li> <b>Default Value:</b> False 107 * </ul> 108 */ 109 public boolean ReverseLimitAutosetPositionEnable = false; 110 /** 111 * The value to automatically set the position to when the reverse 112 * limit switch is asserted. This has no effect if 113 * ReverseLimitAutosetPositionEnable is false. 114 * 115 * <ul> 116 * <li> <b>Minimum Value:</b> -3.4e+38 117 * <li> <b>Maximum Value:</b> 3.4e+38 118 * <li> <b>Default Value:</b> 0 119 * <li> <b>Units:</b> rotations 120 * </ul> 121 */ 122 public double ReverseLimitAutosetPositionValue = 0; 123 /** 124 * If enabled, motor output is set to neutral when reverse limit 125 * switch is asseted and negative output is requested. 126 * 127 * <ul> 128 * <li> <b>Default Value:</b> True 129 * </ul> 130 */ 131 public boolean ReverseLimitEnable = true; 132 /** 133 * Determines where to poll the reverse limit switch. This defaults 134 * to the reverse limit switch pin on the limit switch connector. 135 * <p> 136 * Choose RemoteTalonFX to use the reverse limit switch attached to 137 * another Talon FX on the same CAN bus (this also requires setting 138 * ReverseLimitRemoteSensorID). 139 * <p> 140 * Choose RemoteCANifier to use the reverse limit switch attached to 141 * another CANifier on the same CAN bus (this also requires setting 142 * ReverseLimitRemoteSensorID). 143 * <p> 144 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus 145 * (this also requires setting ReverseLimitRemoteSensorID). The 146 * reverse limit will assert when the CANcoder magnet strength changes 147 * from BAD (red) to ADEQUATE (orange) or GOOD (green). 148 * 149 */ 150 public ReverseLimitSourceValue ReverseLimitSource = ReverseLimitSourceValue.LimitSwitchPin; 151 /** 152 * Device ID of the remote device if using remote limit switch 153 * features for the reverse limit switch. 154 * 155 * <ul> 156 * <li> <b>Minimum Value:</b> 0 157 * <li> <b>Maximum Value:</b> 62 158 * <li> <b>Default Value:</b> 0 159 * <li> <b>Units:</b> 160 * </ul> 161 */ 162 public int ReverseLimitRemoteSensorID = 0; 163 164 /** 165 * Modifies this configuration's ForwardLimitType parameter and returns itself for 166 * method-chaining and easier to use config API. 167 * <p> 168 * Determines if the forward limit switch is normally-open (default) 169 * or normally-closed. 170 * 171 * 172 * @param newForwardLimitType Parameter to modify 173 * @return Itself 174 */ 175 public HardwareLimitSwitchConfigs withForwardLimitType(ForwardLimitTypeValue newForwardLimitType) 176 { 177 ForwardLimitType = newForwardLimitType; 178 return this; 179 } 180 /** 181 * Modifies this configuration's ForwardLimitAutosetPositionEnable parameter and returns itself for 182 * method-chaining and easier to use config API. 183 * <p> 184 * If enabled, the position is automatically set to a specific value, 185 * specified by ForwardLimitAutosetPositionValue, when the forward 186 * limit switch is asserted. 187 * 188 * <ul> 189 * <li> <b>Default Value:</b> False 190 * </ul> 191 * 192 * @param newForwardLimitAutosetPositionEnable Parameter to modify 193 * @return Itself 194 */ 195 public HardwareLimitSwitchConfigs withForwardLimitAutosetPositionEnable(boolean newForwardLimitAutosetPositionEnable) 196 { 197 ForwardLimitAutosetPositionEnable = newForwardLimitAutosetPositionEnable; 198 return this; 199 } 200 /** 201 * Modifies this configuration's ForwardLimitAutosetPositionValue parameter and returns itself for 202 * method-chaining and easier to use config API. 203 * <p> 204 * The value to automatically set the position to when the forward 205 * limit switch is asserted. This has no effect if 206 * ForwardLimitAutosetPositionEnable is false. 207 * 208 * <ul> 209 * <li> <b>Minimum Value:</b> -3.4e+38 210 * <li> <b>Maximum Value:</b> 3.4e+38 211 * <li> <b>Default Value:</b> 0 212 * <li> <b>Units:</b> rotations 213 * </ul> 214 * 215 * @param newForwardLimitAutosetPositionValue Parameter to modify 216 * @return Itself 217 */ 218 public HardwareLimitSwitchConfigs withForwardLimitAutosetPositionValue(double newForwardLimitAutosetPositionValue) 219 { 220 ForwardLimitAutosetPositionValue = newForwardLimitAutosetPositionValue; 221 return this; 222 } 223 /** 224 * Modifies this configuration's ForwardLimitEnable parameter and returns itself for 225 * method-chaining and easier to use config API. 226 * <p> 227 * If enabled, motor output is set to neutral when the forward limit 228 * switch is asserted and positive output is requested. 229 * 230 * <ul> 231 * <li> <b>Default Value:</b> True 232 * </ul> 233 * 234 * @param newForwardLimitEnable Parameter to modify 235 * @return Itself 236 */ 237 public HardwareLimitSwitchConfigs withForwardLimitEnable(boolean newForwardLimitEnable) 238 { 239 ForwardLimitEnable = newForwardLimitEnable; 240 return this; 241 } 242 /** 243 * Modifies this configuration's ForwardLimitSource parameter and returns itself for 244 * method-chaining and easier to use config API. 245 * <p> 246 * Determines where to poll the forward limit switch. This defaults 247 * to the forward limit switch pin on the limit switch connector. 248 * <p> 249 * Choose RemoteTalonFX to use the forward limit switch attached to 250 * another Talon FX on the same CAN bus (this also requires setting 251 * ForwardLimitRemoteSensorID). 252 * <p> 253 * Choose RemoteCANifier to use the forward limit switch attached to 254 * another CANifier on the same CAN bus (this also requires setting 255 * ForwardLimitRemoteSensorID). 256 * <p> 257 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus 258 * (this also requires setting ForwardLimitRemoteSensorID). The 259 * forward limit will assert when the CANcoder magnet strength changes 260 * from BAD (red) to ADEQUATE (orange) or GOOD (green). 261 * 262 * 263 * @param newForwardLimitSource Parameter to modify 264 * @return Itself 265 */ 266 public HardwareLimitSwitchConfigs withForwardLimitSource(ForwardLimitSourceValue newForwardLimitSource) 267 { 268 ForwardLimitSource = newForwardLimitSource; 269 return this; 270 } 271 /** 272 * Modifies this configuration's ForwardLimitRemoteSensorID parameter and returns itself for 273 * method-chaining and easier to use config API. 274 * <p> 275 * Device ID of the remote device if using remote limit switch 276 * features for the forward limit switch. 277 * 278 * <ul> 279 * <li> <b>Minimum Value:</b> 0 280 * <li> <b>Maximum Value:</b> 62 281 * <li> <b>Default Value:</b> 0 282 * <li> <b>Units:</b> 283 * </ul> 284 * 285 * @param newForwardLimitRemoteSensorID Parameter to modify 286 * @return Itself 287 */ 288 public HardwareLimitSwitchConfigs withForwardLimitRemoteSensorID(int newForwardLimitRemoteSensorID) 289 { 290 ForwardLimitRemoteSensorID = newForwardLimitRemoteSensorID; 291 return this; 292 } 293 /** 294 * Modifies this configuration's ReverseLimitType parameter and returns itself for 295 * method-chaining and easier to use config API. 296 * <p> 297 * Determines if the reverse limit switch is normally-open (default) 298 * or normally-closed. 299 * 300 * 301 * @param newReverseLimitType Parameter to modify 302 * @return Itself 303 */ 304 public HardwareLimitSwitchConfigs withReverseLimitType(ReverseLimitTypeValue newReverseLimitType) 305 { 306 ReverseLimitType = newReverseLimitType; 307 return this; 308 } 309 /** 310 * Modifies this configuration's ReverseLimitAutosetPositionEnable parameter and returns itself for 311 * method-chaining and easier to use config API. 312 * <p> 313 * If enabled, the position is automatically set to a specific value, 314 * specified by ReverseLimitAutosetPositionValue, when the reverse 315 * limit switch is asserted. 316 * 317 * <ul> 318 * <li> <b>Default Value:</b> False 319 * </ul> 320 * 321 * @param newReverseLimitAutosetPositionEnable Parameter to modify 322 * @return Itself 323 */ 324 public HardwareLimitSwitchConfigs withReverseLimitAutosetPositionEnable(boolean newReverseLimitAutosetPositionEnable) 325 { 326 ReverseLimitAutosetPositionEnable = newReverseLimitAutosetPositionEnable; 327 return this; 328 } 329 /** 330 * Modifies this configuration's ReverseLimitAutosetPositionValue parameter and returns itself for 331 * method-chaining and easier to use config API. 332 * <p> 333 * The value to automatically set the position to when the reverse 334 * limit switch is asserted. This has no effect if 335 * ReverseLimitAutosetPositionEnable is false. 336 * 337 * <ul> 338 * <li> <b>Minimum Value:</b> -3.4e+38 339 * <li> <b>Maximum Value:</b> 3.4e+38 340 * <li> <b>Default Value:</b> 0 341 * <li> <b>Units:</b> rotations 342 * </ul> 343 * 344 * @param newReverseLimitAutosetPositionValue Parameter to modify 345 * @return Itself 346 */ 347 public HardwareLimitSwitchConfigs withReverseLimitAutosetPositionValue(double newReverseLimitAutosetPositionValue) 348 { 349 ReverseLimitAutosetPositionValue = newReverseLimitAutosetPositionValue; 350 return this; 351 } 352 /** 353 * Modifies this configuration's ReverseLimitEnable parameter and returns itself for 354 * method-chaining and easier to use config API. 355 * <p> 356 * If enabled, motor output is set to neutral when reverse limit 357 * switch is asseted and negative output is requested. 358 * 359 * <ul> 360 * <li> <b>Default Value:</b> True 361 * </ul> 362 * 363 * @param newReverseLimitEnable Parameter to modify 364 * @return Itself 365 */ 366 public HardwareLimitSwitchConfigs withReverseLimitEnable(boolean newReverseLimitEnable) 367 { 368 ReverseLimitEnable = newReverseLimitEnable; 369 return this; 370 } 371 /** 372 * Modifies this configuration's ReverseLimitSource parameter and returns itself for 373 * method-chaining and easier to use config API. 374 * <p> 375 * Determines where to poll the reverse limit switch. This defaults 376 * to the reverse limit switch pin on the limit switch connector. 377 * <p> 378 * Choose RemoteTalonFX to use the reverse limit switch attached to 379 * another Talon FX on the same CAN bus (this also requires setting 380 * ReverseLimitRemoteSensorID). 381 * <p> 382 * Choose RemoteCANifier to use the reverse limit switch attached to 383 * another CANifier on the same CAN bus (this also requires setting 384 * ReverseLimitRemoteSensorID). 385 * <p> 386 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus 387 * (this also requires setting ReverseLimitRemoteSensorID). The 388 * reverse limit will assert when the CANcoder magnet strength changes 389 * from BAD (red) to ADEQUATE (orange) or GOOD (green). 390 * 391 * 392 * @param newReverseLimitSource Parameter to modify 393 * @return Itself 394 */ 395 public HardwareLimitSwitchConfigs withReverseLimitSource(ReverseLimitSourceValue newReverseLimitSource) 396 { 397 ReverseLimitSource = newReverseLimitSource; 398 return this; 399 } 400 /** 401 * Modifies this configuration's ReverseLimitRemoteSensorID parameter and returns itself for 402 * method-chaining and easier to use config API. 403 * <p> 404 * Device ID of the remote device if using remote limit switch 405 * features for the reverse limit switch. 406 * 407 * <ul> 408 * <li> <b>Minimum Value:</b> 0 409 * <li> <b>Maximum Value:</b> 62 410 * <li> <b>Default Value:</b> 0 411 * <li> <b>Units:</b> 412 * </ul> 413 * 414 * @param newReverseLimitRemoteSensorID Parameter to modify 415 * @return Itself 416 */ 417 public HardwareLimitSwitchConfigs withReverseLimitRemoteSensorID(int newReverseLimitRemoteSensorID) 418 { 419 ReverseLimitRemoteSensorID = newReverseLimitRemoteSensorID; 420 return this; 421 } 422 423 /** 424 * Helper method to configure this feedback group to use RemoteTalonFX 425 * forward limit switch by passing in the TalonFX object. When using 426 * RemoteTalonFX, the Talon FX will use the forward limit switch 427 * attached to another Talon FX on the same CAN bus. 428 * 429 * @param device TalonFX reference to use for RemoteTalonFX forward limit 430 * switch 431 * @return Itself 432 */ 433 public HardwareLimitSwitchConfigs withForwardLimitRemoteTalonFX(CoreTalonFX device) 434 { 435 this.ForwardLimitSource = ForwardLimitSourceValue.RemoteTalonFX; 436 this.ForwardLimitRemoteSensorID = device.getDeviceID(); 437 return this; 438 } 439 440 /** 441 * Helper method to configure this feedback group to use 442 * RemoteCANcoder forward limit switch by passing in the CANcoder 443 * object. When using RemoteCANcoder, the Talon FX will use another 444 * CANcoder on the same CAN bus. The forward limit will assert when 445 * the CANcoder magnet strength changes from BAD (red) to ADEQUATE 446 * (orange) or GOOD (green). 447 * 448 * @param device CANcoder reference to use for RemoteCANcoder forward limit 449 * switch 450 * @return Itself 451 */ 452 public HardwareLimitSwitchConfigs withForwardLimitRemoteCANcoder(CoreCANcoder device) 453 { 454 this.ForwardLimitSource = ForwardLimitSourceValue.RemoteCANcoder; 455 this.ForwardLimitRemoteSensorID = device.getDeviceID(); 456 return this; 457 } 458 459 /** 460 * Helper method to configure this feedback group to use RemoteTalonFX 461 * reverse limit switch by passing in the TalonFX object. When using 462 * RemoteTalonFX, the Talon FX will use the reverse limit switch 463 * attached to another Talon FX on the same CAN bus. 464 * 465 * @param device TalonFX reference to use for RemoteTalonFX reverse limit 466 * switch 467 * @return Itself 468 */ 469 public HardwareLimitSwitchConfigs withReverseLimitRemoteTalonFX(CoreTalonFX device) 470 { 471 this.ReverseLimitSource = ReverseLimitSourceValue.RemoteTalonFX; 472 this.ReverseLimitRemoteSensorID = device.getDeviceID(); 473 return this; 474 } 475 476 /** 477 * Helper method to configure this feedback group to use 478 * RemoteCANcoder reverse limit switch by passing in the CANcoder 479 * object. When using RemoteCANcoder, the Talon FX will use another 480 * CANcoder on the same CAN bus. The reverse limit will assert when 481 * the CANcoder magnet strength changes from BAD (red) to ADEQUATE 482 * (orange) or GOOD (green). 483 * 484 * @param device CANcoder reference to use for RemoteCANcoder reverse limit 485 * switch 486 * @return Itself 487 */ 488 public HardwareLimitSwitchConfigs withReverseLimitRemoteCANcoder(CoreCANcoder device) 489 { 490 this.ReverseLimitSource = ReverseLimitSourceValue.RemoteCANcoder; 491 this.ReverseLimitRemoteSensorID = device.getDeviceID(); 492 return this; 493 } 494 495 496 497 @Override 498 public String toString() 499 { 500 String ss = "Config Group: HardwareLimitSwitch\n"; 501 ss += "Name: \"ForwardLimitType\" Value: \"" + ForwardLimitType + "\"" + "\n"; 502 ss += "Name: \"ForwardLimitAutosetPositionEnable\" Value: \"" + ForwardLimitAutosetPositionEnable + "\"" + "\n"; 503 ss += "Name: \"ForwardLimitAutosetPositionValue\" Value: \"" + ForwardLimitAutosetPositionValue + "rotations\"" + "\n"; 504 ss += "Name: \"ForwardLimitEnable\" Value: \"" + ForwardLimitEnable + "\"" + "\n"; 505 ss += "Name: \"ForwardLimitSource\" Value: \"" + ForwardLimitSource + "\"" + "\n"; 506 ss += "Name: \"ForwardLimitRemoteSensorID\" Value: \"" + ForwardLimitRemoteSensorID + "\"" + "\n"; 507 ss += "Name: \"ReverseLimitType\" Value: \"" + ReverseLimitType + "\"" + "\n"; 508 ss += "Name: \"ReverseLimitAutosetPositionEnable\" Value: \"" + ReverseLimitAutosetPositionEnable + "\"" + "\n"; 509 ss += "Name: \"ReverseLimitAutosetPositionValue\" Value: \"" + ReverseLimitAutosetPositionValue + "rotations\"" + "\n"; 510 ss += "Name: \"ReverseLimitEnable\" Value: \"" + ReverseLimitEnable + "\"" + "\n"; 511 ss += "Name: \"ReverseLimitSource\" Value: \"" + ReverseLimitSource + "\"" + "\n"; 512 ss += "Name: \"ReverseLimitRemoteSensorID\" Value: \"" + ReverseLimitRemoteSensorID + "\"" + "\n"; 513 return ss; 514 } 515 516 /** 517 * 518 */ 519 public StatusCode deserialize(String to_deserialize) 520 { 521 ForwardLimitType = ForwardLimitTypeValue.valueOf(ConfigJNI.Deserializeint(SpnValue.Config_ForwardLimitType.value, to_deserialize)); 522 ForwardLimitAutosetPositionEnable = ConfigJNI.Deserializeboolean(SpnValue.Config_ForwardLimitAutosetPosEnable.value, to_deserialize); 523 ForwardLimitAutosetPositionValue = ConfigJNI.Deserializedouble(SpnValue.Config_ForwardLimitAutosetPosValue.value, to_deserialize); 524 ForwardLimitEnable = ConfigJNI.Deserializeboolean(SpnValue.Config_ForwardLimitEnable.value, to_deserialize); 525 ForwardLimitSource = ForwardLimitSourceValue.valueOf(ConfigJNI.Deserializeint(SpnValue.Config_ForwardLimitSource.value, to_deserialize)); 526 ForwardLimitRemoteSensorID = ConfigJNI.Deserializeint(SpnValue.Config_ForwardLimitRemoteSensorID.value, to_deserialize); 527 ReverseLimitType = ReverseLimitTypeValue.valueOf(ConfigJNI.Deserializeint(SpnValue.Config_ReverseLimitType.value, to_deserialize)); 528 ReverseLimitAutosetPositionEnable = ConfigJNI.Deserializeboolean(SpnValue.Config_ReverseLimitAutosetPosEnable.value, to_deserialize); 529 ReverseLimitAutosetPositionValue = ConfigJNI.Deserializedouble(SpnValue.Config_ReverseLimitAutosetPosValue.value, to_deserialize); 530 ReverseLimitEnable = ConfigJNI.Deserializeboolean(SpnValue.Config_ReverseLimitEnable.value, to_deserialize); 531 ReverseLimitSource = ReverseLimitSourceValue.valueOf(ConfigJNI.Deserializeint(SpnValue.Config_ReverseLimitSource.value, to_deserialize)); 532 ReverseLimitRemoteSensorID = ConfigJNI.Deserializeint(SpnValue.Config_ReverseLimitRemoteSensorID.value, to_deserialize); 533 return StatusCode.OK; 534 } 535 536 /** 537 * 538 */ 539 public String serialize() 540 { 541 String ss = ""; 542 ss += ConfigJNI.Serializeint(SpnValue.Config_ForwardLimitType.value, ForwardLimitType.value); 543 ss += ConfigJNI.Serializeboolean(SpnValue.Config_ForwardLimitAutosetPosEnable.value, ForwardLimitAutosetPositionEnable); 544 ss += ConfigJNI.Serializedouble(SpnValue.Config_ForwardLimitAutosetPosValue.value, ForwardLimitAutosetPositionValue); 545 ss += ConfigJNI.Serializeboolean(SpnValue.Config_ForwardLimitEnable.value, ForwardLimitEnable); 546 ss += ConfigJNI.Serializeint(SpnValue.Config_ForwardLimitSource.value, ForwardLimitSource.value); 547 ss += ConfigJNI.Serializeint(SpnValue.Config_ForwardLimitRemoteSensorID.value, ForwardLimitRemoteSensorID); 548 ss += ConfigJNI.Serializeint(SpnValue.Config_ReverseLimitType.value, ReverseLimitType.value); 549 ss += ConfigJNI.Serializeboolean(SpnValue.Config_ReverseLimitAutosetPosEnable.value, ReverseLimitAutosetPositionEnable); 550 ss += ConfigJNI.Serializedouble(SpnValue.Config_ReverseLimitAutosetPosValue.value, ReverseLimitAutosetPositionValue); 551 ss += ConfigJNI.Serializeboolean(SpnValue.Config_ReverseLimitEnable.value, ReverseLimitEnable); 552 ss += ConfigJNI.Serializeint(SpnValue.Config_ReverseLimitSource.value, ReverseLimitSource.value); 553 ss += ConfigJNI.Serializeint(SpnValue.Config_ReverseLimitRemoteSensorID.value, ReverseLimitRemoteSensorID); 554 return ss; 555 } 556} 557