利用時間試用了一下 Cursor(https://www.cursor.so/),使用的是最近開發BLE專案用到的開源代碼 pc-ble-driver-py (https://github.com/NordicSemiconductor/pc-ble-driver-py)
pc-ble-driver-py主要是拿來 nrf Connect for Desktop 做不到的功能,開發客製DFU升級工具程式。
心得:
測試一: prompt: provide the caller & callee relation chart
感覺是有產生出物件的說明
The code does not include a caller and callee relation chart. However, we can infer the relationship between the various classes and objects based on their usage in the code. The BSCollector class is the main class that manages the BLE driver and adapter, and is responsible for calling methods on the other classes and objects as needed. The BLEDriverObserver and BLEAdapterObserver classes are used to observe events from the BLE driver and adapter, respectively, and are called by the BSCollector class. The `BLEGapScanParams`, `BLEGapSecParams`, `BLEGapSecKDist`, and BLEUUID classes are used to define various parameters for the BLE connection, and are used by the BSCollector class when scanning for devices and connecting to them. The EvtSync class is used to synchronize events between the BLE driver and adapter, and is used by the BSCollector class to wait for events from the device. Finally, the Queue class is used to manage a queue of connections to the device, and is used by the BSCollector class to store connections to the device.
測試二:
prompt: if i need to add disconnect handle, how to do it?
第一感覺被嚇到,這麼聰明嗎? 但,搜尋了一下代碼,發現這是原本就有的參考範例。
測試三:
試著用 Attempt Change 套用到我的測試代碼裡,發現就給些很無用的建議了
感想:
從無到有的生成,其實已經相對成熟。 但如果要在已經既有的代碼專案裡面,給修改指導,其實還在很初階的階段。