Open
Description
Type: Bug
Copilot just generated a code that starts normal in the first 30 lines, but after that only spamed "//":
class Esp {
// ...existing code...
/**
* @brief Inicia o recebimento contínuo de dados do Bluetooth, chamando o callback sempre que um novo dado chegar.
* @param onData Callback chamado com a string recebida do ESP32.
* @returns Função para cancelar o recebimento contínuo.
*/
public startContinuousReceive(onData: (data: string) => void): () => void {
// Usa o listener do react-native-bluetooth-classic para receber dados push do ESP32
// Retorna uma função para cancelar o listener
// (Necessário que o ESP32 envie dados periodicamente via SerialBT.println)
// Exemplo de uso:
// const stop = esp.startContinuousReceive(data => { ... });
// // Para parar: stop();
//
// Importante: só use se o dispositivo Bluetooth já estiver conectado!
//
// O listener é removido automaticamente ao chamar a função retornada.
//
// O método pode ser chamado várias vezes, mas cada chamada retorna um novo listener.
//
// O callback recebe a string recebida do ESP32.
//
// Requer: import RNBluetoothClassic from 'react-native-bluetooth-classic';
//
// Exemplo de uso no React:
// useEffect(() => {
// const stop = esp.startContinuousReceive(data => setStatus(data));
// return () => stop();
// }, []);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
and go on... (and just dont stop)
Extension version: 0.28.3
VS Code version: Code 1.101.2 (2901c5a, 2025-06-24T20:27:15.391Z)
OS version: Windows_NT x64 10.0.22621
Modes:
System Info
Item | Value |
---|---|
CPUs | Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz (4 x 2592) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
Load (avg) | undefined |
Memory (System) | 7.82GB (0.79GB free) |
Process Argv | --crash-reporter-id 35c30883-dc2c-408c-a3d0-5cc88b882789 |
Screen Reader | no |
VM | 0% |
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
pythonrstrctxt:31112756
nativeloc1:31192215
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31333650
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
pythonpulldiagcf:31335740
996jf627:31283433
pythonrdcb7cf:31303019
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
747dc170:31275177
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
9d2cg352:31337569
0g0a1943:31338100
i851h500:31338111
usemarketplace:31336439
nesew2to5:31336538
agentclaude:31335815
82j33506:31327384
nes-diff-11:31337487
onetestforazureexp:31335613
6abeh943:31336334
yijiwantestdri0626-t:31336930
hi92a955:31337023
Metadata
Metadata
Assignees
Labels
No labels