update HAP

This commit is contained in:
hathach committed 2017-10-15 15:03:07 +07:00
1 parent e81d315f28
commit dc3d968745
3 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -42,6 +42,7 @@
#include "service/HAPAccessoryInfo.h"
#include "service/HAPPairing.h"
#include "service/HAPLightBulb.h"
enum
{
@@ -82,7 +83,7 @@ class BLEHomekit : public Advertisable
HAPService _protocol_info;
HAPPairing _pairing;
HAPService _lightbulb;
HAPLightBulb _lightbulb;
};
#endif /* BLEHOMEKIT_H_ */
@@ -74,7 +74,7 @@ err_t HAPAccessoryInfo::begin(void)
for(uint8_t i=0; i<arrcount(strvals); i++)
{
HAPCharacteristic chr(uuids[i]);
HAPCharacteristic chr(uuids[i], BLE_GATT_CPF_FORMAT_UTF8S);
chr.setTempMemory();
chr.setProperties(CHR_PROPS_READ);
@@ -39,7 +39,7 @@
#include "HAPLightBulb.h"
HAPLightBulb::HAPLightBulb(void)
: HAPService(HAP_UUID_SVC_LIGHT_BULB), _on(HAP_UUID_CHR_ON)
: HAPService(HAP_UUID_SVC_LIGHT_BULB), _on(HAP_UUID_CHR_ON, BLE_GATT_CPF_FORMAT_BOOLEAN)
{
}