The rc::Gyro class can be used to control gyro settings. There are two types of gyroscopes supported: normal and AVCS. For normal gyroscopes gain is encoded linear, going from -256 at 0% gain to 256 at 100% gain. AVCS gyroscopes support normal mode as well, but the encoding is different. When in normal mode, gain goes from 0 at 0% gain to -256 at 100% gain. In AVCS mode gain goes from 0 at 0% gain to 256 at 100% gain.
Note: heading hold and AVCS are the same. Normal is also called Rate.